AdUrls

Contains the methods used to get the ad's URLs, tracking template, and custom parameters. For information, see URL Tracking with Upgraded URLs.

Methods

Method Name Return Type Description
getCustomParameters Object Gets the ad's custom parameters.
getFinalUrl string Gets the ad's final URL.
getMobileFinalUrl string Gets the ad's final URL for mobile devices.
getTrackingTemplate string Gets the ad's tracking template.

getCustomParameters

Gets the ad's custom parameters.

Custom parameters are helpful with sharing dynamic information across multiple URLs. For more information about its usage, see Custom Parameters.

Returns

Type Description
Object A map of the ad's custom parameters.

For example, {key1: 'value1', key2: 'value2', key3: 'value3'}, where key is the name of the custom parameter and value is the parameter's value.

getFinalUrl

Gets the ad's final URL. This is the URL of the webpage that the user is taken to when they click the ad.

The same override rules apply as elsewhere. For example, specifying a keyword's final URL overrides the ad's final URL.

Returns

Type Description
string The ad's final URL.

getMobileFinalUrl

Gets the ad's final URL for mobile devices. This is the URL of the mobile webpage that the user is taken to when they click the ad.

The same override rules apply as elsewhere. For example, specifying a keyword's mobile final URL overrides the ad's mobile final URL.

Returns

Type Description
string The ad's final URL for mobile devices.

getTrackingTemplate

Gets the ad's tracking template.

Tracking templates are used with the keyword's FinalUrl to create the destination URL used by the ad. For more information, see What tracking or URL parameters can I use?

Returns

Type Description
string The ad's tracking template.