ReferralService

ReferralService enables publishers to add a referral button to their website that directs users to products like AdSense and Firefox with Google Toolbar. When a user clicks through, Google credits a payment.

Generating Code Snippet for Referral Button

To generate the code snippet and button link, use the getReferralData operation, passing in the synServiceId, locale and referralType (such as Adsense or Firefox). The response is a ReferralService_Data object that contains the image tag and snippet.

The version 2 WSDL for this service is at https://www.google.com/api/adsense/v2/ReferralService?wsdl.

The version 3 WSDL for this service is at https://www.google.com/api/adsense/v3/ReferralService?wsdl.

Requests

getReferralData

Returns pairs of referral snippet and impression tag.

Parameters

Parameter nameParameter typeParameter description
synServiceId string
the syndication service ID
locale string
the language for the referral button. Must be a Google supported locale.
referralType ReferralService_Type
Referral type.

Values are:

  • AdSense - Referral type is AdSense
  • AdWords - Referral type is AdWords
  • Firefox - Referral type is Firefox
  • Pack - Referral type is Pack
  • GoogleApps - Referral type is Google Apps
  • Checkout - Referral type is Checkout

Response

Response typeResponse description
ReferralService_Data[] an array of ReferralService_Data objects, each of which is a pair of referral snippet and HTML impression tag.

Errors

Error numberError description
201 if synServiceId is not valid
701 if referralType is not supported or is invalid
702 if locale is an invalid locale

getReferralTypes

Returns an array of the supported ReferralService_Type values.

Response

Response typeResponse description
ReferralService_Type[] Values are:
  • AdSense - Referral type is AdSense
  • AdWords - Referral type is AdWords
  • Firefox - Referral type is Firefox
  • Pack - Referral type is Pack
  • GoogleApps - Referral type is Google Apps
  • Checkout - Referral type is Checkout