Stay organized with collections
Save and categorize content based on your preferences.
When using Upgraded URLs, the serving URL for an ad or ad extension is
constructed by combining various fields according to a set of
rules. This section examines these rules in more detail.
Hierarchy of Google Ads entities
When resolving Upgraded URL fields, the following hierarchy (highest to lowest)
is used by Google Ads:
Customer
Campaign
Ad Group
Ad
Ad Group Criterion
FeedItem (including sitelinks)
Which final URL is used?
The final URL is used by default when building the serving URL. If an
supported entity is served on a mobile network and has a
valid final mobile URL, then that is used instead of the final URL.
Final app URL is currently supported only for app engagements ads.
How the system expands the serving URL
Here are the steps the system takes when expanding the serving URL:
Determine which final URL to use.
It starts by determining which final URL to use. This varies depending on
the entity involved.
Entity
Which final URL to use?
FeedItem (sitelink)
Always use its own final URL.
Ad X served on keyword Y
If the keyword has its own final URL, use it.
Otherwise use the ad’s final URL.
Determine which tracking URL template to use.
The tracking URL for an entity is determined by traversing its object
hierarchy, and choosing the value from the entity lowest in the hierarchy.
If no tracking URL template values can be found in the hierarchy, the
tracking URL template's value is set to empty.
For example, if an ad has tracking URL template values defined only at its
parent ad group and account levels, the value from the parent ad group is
used.
Determine which custom parameter values to use.
The value for a given custom parameter is resolved by traversing the object
hierarchy, and choosing the value from the entity lowest in the hierarchy.
If no value is defined for the custom parameter, an empty string is used as
its value.
For example, when determining the value for a particular custom parameter at
the ad level, if that custom parameter has values defined at its parent ad
group and at the account level, the value from the parent ad group is used.
Expand the final URL.
The system expands the final URL by performing the following three steps:
Expand the custom parameter values.
The system parses the final URL and substitutes the values for each
custom parameter in the URL, using the values determined in step 3
above.
Expand the ValueTrack tags in the URL.
The system parses the final URL, and substitutes values for any
ValueTrack tags
present in the URL.
Strip the {ignore} tag.
Any {ignore} ValueTrack parameter in the expanded final URL is
removed.
Expand the tracking template.
If there's an empty value for the tracking template (as determined above in
step 2), this step is skipped. Otherwise, the tracking URL template is
expanded as follows:
Expand the custom parameter values.
The system parses the tracking template URL, and substitutes the values
for each custom parameter in the URL using the values determined in step
3.
Expand the ValueTrack tags in the URL.
The system parses the tracking template URL, and substitutes values for
any ValueTrack tags present in the URL.
Substitute {lpurl} parameter in tracking template.
If the tracking template URL contains {lpurl} or one of its variants,
it's replaced with the expanded final URL from step 4.
If {lpurl} is inserted at the beginning of the tracking template, then
it is not escaped. If positioned elsewhere in the tracking template,
the following characters are escaped: ?, =, ", #,
\t, ', and \[space\].
{unescapedlpurl} is always unescaped.
{escapedlpurl} is always escaped.
{lpurl+2} is always escaped twice.
{lpurl+3} is always escaped three times.
Pick the serving URL.
If your tracking template URL is empty, the expanded final URL from step 4
is used. Otherwise, the system uses the expanded tracking template URL from
step 5.
Sitelinks are an exception to this rule: If the tracking URL template
(determined in step 2) does not contain the {lpurl} parameter, then the
sitelink's final URL is used as the serving URL.
Example scenarios
Consider an account with the following structure:
Account
Campaign 1
Ad Group 1
Ad 1
Keyword 1 (shoes)
Keyword 2 (hats)
Ad Group 2
Ad 2
Ad 3
Keyword 3 (watches)
FeedItem 1 (sitelink 1)
Assume the following Upgraded URL fields are defined on these entities:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-18 UTC."],[[["Upgraded URLs are built by combining various fields like final URL, tracking template, and custom parameters."],["The system uses a hierarchy (Customer \u003e Campaign \u003e Ad Group \u003e Ad \u003e Ad Group Criterion \u003e FeedItem) to determine which URL to use."],["The final URL can be replaced with a final mobile URL on mobile devices or a final app URL for app engagement ads."],["Tracking templates and custom parameters are selected from the lowest level in the hierarchy where they are defined."],["The final serving URL is either the expanded final URL or the expanded tracking template, depending on the presence of the `{lpurl}` parameter."]]],[]]