Redigera

Dela via


AdGroupUrls

Contains the methods for managing the ad group's URLs. For more information, see URL Tracking with Upgraded URLs.

Methods

Method Name Return Type Description
clearTrackingTemplate void Removes the tracking template from this ad group.
getCustomParameters Object Gets the ad group's custom parameters.
getTrackingTemplate string Gets the ad group's tracking template.
setCustomParameters(Object customParameters) void Sets the ad group's custom parameters.
setTrackingTemplate(string trackingTemplate) void Sets the ad group's tracking template.

clearTrackingTemplate

Removes the tracking template from this ad group. For information about tracking templates, see Tracking Templates.

Returns

Type Description
void Returns nothing.

getCustomParameters

Gets the ad group'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 group'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.

getTrackingTemplate

Gets the ad group'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 group's tracking template.

setCustomParameters(Object customParameters)

Sets the ad group's custom parameters. Use this method if your final URL or tracking template includes custom substitution strings.

To use a customer parameter name in the final URL or tracking template, enclose the name in curly braces and add a leading underscore (_) to the name. For example, if the parameter name is foo, use {_foo} in the tracking template or final URL. Do not add a leading underscore to the parameter name when defining the custom parameters object.

Calling this method replaces the ad group's existing custom parameters.

To clear the custom parameters from the ad group, pass an empty object (for example, setCustomParameters({})). If you clear the ad group's custom parameters, the ad group inherits the URLs from its parent campaign (if the campaign specifies URLs). To completely clear custom parameters, clear the parameters at all levels.

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

Arguments

Name Type Description
customParameters Object A map of up to three custom parameters to use in the ad group. For example, {key1: 'value1', key2: 'value2', key3: 'value3'}, where key is the name of the custom parameter and value is the parameter's value. The parameter's name may contain only alphanumeric characters and the parameter's value may not contain white space. The name may contain a maximum of 16 8-byte characters and the value may contain a maximum of 200 8-byte characters.

Returns

Type Description
void Returns nothing.

setTrackingTemplate(string trackingTemplate)

Sets the tracking template to use with this ad group.

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?

Arguments

Name Type Description
trackingTemplate string The tracking template to use with this ad group.

Returns

Type Description
void Returns nothing.