com.google.gwt.gadgets.client.impl
Class AdsFeatureImpl

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

public class AdsFeatureImpl
extends java.lang.Object
implements AdsFeature

Provides access to the Ads APIs provided by the container.


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)
Description copied from interface: AdsFeature
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.

Specified by:
clickDestinationUrl in interface AdsFeature
Parameters:
destUrl - Final destination URL you want to report and be redirected to

reportInteraction

public void reportInteraction()
Description copied from interface: AdsFeature
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.

Specified by:
reportInteraction in interface AdsFeature

reportInteraction

public void reportInteraction(java.lang.String name)
Description copied from interface: AdsFeature
Reports a named user-interaction.

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

Specified by:
reportInteraction in interface AdsFeature
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)
Description copied from interface: AdsFeature
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.

Specified by:
reportInteraction in interface AdsFeature
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)
Description copied from interface: AdsFeature
Reliably reports an interaction followed by a clickthrough and redirect to the destination URL.

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

Specified by:
reportInteractionClick in interface AdsFeature
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