AdWordsApp.​ShoppingCampaignUrls

Provides access to shopping campaign URLs. See Final URL for more information.

Methods:

MemberTypeDescription
clearFinalUrlSuffix void Clears the final URL suffix of the shopping campaign.
clearTrackingTemplate void Clears the tracking template of the shopping campaign.
getCustomParameters Object Returns the custom parameters of the shopping campaign.
getFinalUrlSuffix String Returns the final URL suffix of the shopping campaign.
getTrackingTemplate String Returns the tracking template of the shopping campaign.
setCustomParameters void Sets the custom parameters of the shopping campaign.
setFinalUrlSuffix void Sets the final URL suffix of the shopping campaign.
setTrackingTemplate void Sets the tracking template of the shopping campaign.

clearFinalUrlSuffix()

Clears the final URL suffix of the shopping campaign.

Returns nothing.

clearTrackingTemplate()

Clears the tracking template of the shopping campaign.

If you clear the tracking template specified at a lower level entity (e.g. a keyword), and you have also specified tracking template on a higher level entity, (e.g. the parent ad group), then AdWords will use the tracking template specified at the higher level entity (i.e. the ad group level tracking template will be used). To completely clear tracking template, it must be cleared at all levels of the hierarchy at which it was set.

See Using Upgraded URLs for more information.

Returns nothing.

getCustomParameters()

Returns the custom parameters of the shopping campaign.

Custom parameters enable you to create your own ValueTrack parameters that you can assign your own IDs to.

The name of a custom parameter can contain only alphanumeric characters, and custom parameter values may not contain white space. When referring to the custom parameter in final URLs and tracking template, you should surround the custom parameter in braces, and prefix an underscore to its name, e.g. {_param}.

You can have up to 3 custom parameters for an entity. The key and value must not exceed 16 and 200 bytes respectively.

Custom parameters specified at a lower level entity will override the setting specified at a higher level entity, e.g., setting custom parameters at the ad group level overrides the setting at the campaign level.

See Using Upgraded URLs for more information.

Return values:

TypeDescription
Object The custom parameters of the shopping campaign as a map of the following form: {key1: 'value1', key2: 'value2', key3: 'value3'}.

getFinalUrlSuffix()

Returns the final URL suffix of the shopping campaign.

When parallel tracking is enabled, the final URL suffix gets appended to the final URL.

Return values:

TypeDescription
String The final URL suffix of the shopping campaign.

getTrackingTemplate()

Returns the tracking template of the shopping campaign.

You can optionally use the tracking template to specify additional tracking parameters or redirects. AdWords will use this template to assemble the actual destination URL to associate with the ad.

A tracking template specified at a lower level entity will override the setting specified at a higher level entity, e.g., a tracking template at the ad group level overrides the setting at the campaign level.

See Using Upgraded URLs for more information.

Return values:

TypeDescription
String The tracking template of the shopping campaign.

setCustomParameters(customParameters)

Sets the custom parameters of the shopping campaign.

Custom parameters enable you to create your own ValueTrack parameters that you can assign your own IDs to.

The name of a custom parameter can contain only alphanumeric characters, and custom parameter values may not contain white space. When referring to the custom parameter in final URLs and tracking template, you should surround the custom parameter in braces, and prefix an underscore to its name, e.g. {_param}.

You can have up to 3 custom parameters for an entity. The key and value must not exceed 16 and 200 bytes respectively.

Custom parameters specified at a lower level entity will override the setting specified at a higher level entity, e.g., setting custom parameters at the ad group level overrides the setting at the campaign level.

Note that this method will replace any existing custom parameters with the specified value.

You may pass an empty object, e.g. setCustomParameters({}) to clear the custom parameters of the shopping campaign. If you clear the custom parameters specified at a lower level entity (e.g. a keyword), and you have also specified custom parameters on a higher level entity, (e.g. the parent ad group), then AdWords will use the custom parameters specified at the higher level entity (i.e. the ad-group-level custom parameters will be used). To completely clear custom parameters, it must be cleared at all levels of the hierarchy at which it was set.

See Using Upgraded URLs for more information.

Returns nothing.

Arguments:

NameTypeDescription
customParameters Object The custom parameters of the shopping campaign as a map of the form {key1: 'value1', key2: 'value2', key3: 'value3'}.

setFinalUrlSuffix(suffix)

Sets the final URL suffix of the shopping campaign.

When parallel tracking is enabled, the final URL suffix gets appended to the final URL.

Returns nothing.

Arguments:

NameTypeDescription
suffix String The new final URL suffix.

setTrackingTemplate(trackingTemplate)

Sets the tracking template of the shopping campaign.

You can optionally use the tracking template to specify additional tracking parameters or redirects. AdWords will use this template to assemble the actual destination URL to associate with the ad.

A tracking template specified at a lower level entity will override the setting specified at a higher level entity, e.g., a tracking template at the ad group level overrides the setting at the campaign level.

See Using Upgraded URLs for more information.

Returns nothing.

Arguments:

NameTypeDescription
trackingTemplate String The tracking template of the shopping campaign.

Send feedback about...

Google Ads scripts
Google Ads scripts
Need help? Visit our support page.