com.google.gwt.gadgets.client
Class AdsFeature

java.lang.Object
  extended by com.google.gwt.gadgets.client.AdsFeature
All Implemented Interfaces:
GadgetFeature

public class AdsFeature
extends java.lang.Object
implements GadgetFeature

Provides access to the Ads APIs provided by the container.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.gwt.gadgets.client.GadgetFeature
GadgetFeature.FeatureName, GadgetFeature.MayRequire
 
Method Summary
 void clickDestinationUrl(java.lang.String destUrl)
          Reports a clickthrough and redirect to the destination URL.
 void reportInteraction()
          Reports a single user-interaction.
 void reportInteraction(java.lang.String name)
          Reports a named user-interaction.
 void reportInteraction(java.lang.String name, java.lang.String value)
          Reports a named user-interaction that you want summed-up.
 void reportInteractionClick(java.lang.String destUrl, java.lang.String name, java.lang.String value)
          Reliably reports an interaction followed by a clickthrough and redirect to the destination URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clickDestinationUrl

public void clickDestinationUrl(java.lang.String destUrl)
Reports a clickthrough and redirect to the destination URL.

In order to enable clickthrough tracking on this link, you must use this method to initiate the redirect. When this method is called, a clickthrough hit is received and then redirected to the destination.

Parameters:
destUrl - Final destination URL you want to report and be redirected to

reportInteraction

public void reportInteraction()
Reports a single user-interaction.

Use this when your gadget contains only a single user-interaction that needs to be tracked. For example, this could be a click-to-play button which starts video playback or a start button to load in a Flash game. Each time this function is called, a generic hit is sent to the tracking server. These hits are grouped into "Primary Interactions" in the interaction reports.


reportInteraction

public void reportInteraction(java.lang.String name)
Reports a named user-interaction.

Use this function when your gadget needs to track multiple user interaction types.

Parameters:
name - The name of the reported interaction. It must match one from the supported list of interactions

reportInteraction

public void reportInteraction(java.lang.String name,
                              java.lang.String value)
Reports a named user-interaction that you want summed-up.

Use this function when you want pass in a value for a specific interaction type to be summed up in the reports.

Parameters:
name - The name of the reported interaction. It must match one from the supported list of interactions
value - value to sum up for the reported interaction. It must be a positive number

reportInteractionClick

public void reportInteractionClick(java.lang.String destUrl,
                                   java.lang.String name,
                                   java.lang.String value)
Reliably reports an interaction followed by a clickthrough and redirect to the destination URL.

This function is a combination of two methods: clickDestinationUrl(String) and reportInteraction(String, String). All three parameters are analogous to the parameters passed into each individual function.

Parameters:
destUrl - final destination URL you want to report and be redirected to
name - The name of the reported interaction. It must match one from the supported list of interactions. This parameter is optional, null is accepted
value - value to sum up for the reported interaction. It must be a positive number This parameter is optional, null is accepted