GuidesGoogle Ads

Google Ads tracking template: how to set one up

A Google Ads tracking template is a URL pattern, set at the account, campaign, ad group, ad, keyword or sitelink level, that wraps your final URL and appends tracking values when someone clicks. It must contain a ValueTrack parameter that inserts your final URL, usually {lpurl}. Add UTM parameters and ValueTrack values such as {campaignid}, then use the Test button to confirm the landing page loads.

Updated November 20, 20265 steps4 min read

Audit my Google Ads →

$1 today. Cancel anytime before day 7.

Set a tracking template in five steps
  1. 1Choose the levelAccount for one rule everywhere, or a campaign, ad group, ad, keyword or sitelink when one needs its own. The most specific level wins.
  2. 2Start from {lpurl}Put {lpurl} first so Google inserts the final URL, then add your parameters after it.
  3. 3Add UTM and ValueTrack valuesWrite utm_source=google, utm_medium=cpc and ValueTrack parameters like {campaignid} as the values you want to read later.
  4. 4Move landing page parameters to the Final URL suffixAnything your own site must receive belongs in the Final URL suffix, which is appended to the final URL.
  5. 5Test itUse the Test button next to the template. It combines your final URL with the tracking setup and checks the landing page loads.
On this page
  1. Where a Google Ads tracking template goes
  2. How {lpurl} and the final URL work together
  3. ValueTrack parameters: {campaignid}, {adgroupid}, {keyword} and more
  4. Tracking template vs Final URL suffix vs custom parameters
  5. Parallel tracking and how to test a template
  6. Three templates you can copy
  7. Questions

Where a Google Ads tracking template goes

Google Ads lets you set URL options at the account, campaign, ad group, ad, keyword and sitelink levels. A template applies to every ad beneath the level where you set it.

When several are defined, the most specific one is used. Google's Ads Help Center puts the order as keyword first, then ad, ad group, campaign and account. Set the account template as your default and override it only where a campaign genuinely needs different tracking.

At the account level, open Admin, then Account settings, and look for the Tracking template section. At lower levels, use the pencil icon in the Tracking template column.

How {lpurl} and the final URL work together

Tracking templates at the account, campaign or ad group level must include a ValueTrack parameter that inserts your final URL. {lpurl} is the one Google recommends. It is escaped unless it sits at the very start of the template, so keep it first.

A template with no way to insert the final URL sends the click nowhere useful. If your tracker is a redirect service, the template usually looks like the redirect address with {lpurl} passed inside it, and Google documents separate escaped versions of {lpurl} for those chains.

Want this checked in your Google Ads account?

Reads campaigns, search terms, keywords and conversions. Every change waits for your approval.

ValueTrack parameters: {campaignid}, {adgroupid}, {keyword} and more

ValueTrack parameters are placeholders Google fills in at click time. {campaignid} returns the campaign ID and {adgroupid} the ad group ID. {keyword} returns the matched keyword, and {matchtype} returns e for exact, p for phrase or b for broad. {device} returns m for mobile, t for tablet or c for computer, and {gclid} returns the Google click identifier. {creative} returns the ad ID, {network} the click source, and {lpurl} your final URL. Not every parameter works in every campaign type: Demand Gen does not support {keyword}, {network}, {placement} or {targetid}, and Video campaigns support only {adgroupid}, {campaignid}, {creative}, {device}, the location parameters, {network} and {placement}.

In Performance Max, {keyword} returns nothing because matches are keywordless, and {gclid} has limited support. Plan your naming around {campaignid} and {device} there. Pair these values with the UTM builder so the naming stays consistent across channels.

Tracking template vs Final URL suffix vs custom parameters

The tracking template wraps the whole URL and can send the click through a tracker first. The Final URL suffix is a string of parameters appended to the final URL itself, so it is the right place for values your landing page or analytics must read. Google says it cannot start with ?, & or #, and it can be set at the account, campaign, ad group, ad, dynamic ads target and keyword levels.

Custom parameters are names you define yourself, written as {_name} and used inside a template or suffix. For example, you can set a custom parameter called geo on a campaign and write geo={_geo} in the Final URL suffix, so each campaign passes its own value without editing the template.

Parallel tracking and how to test a template

With parallel tracking, the click goes straight to your final URL while the tracking template loads in the background. Google states that parallel tracking is mandatory for Search, Shopping, Display, Video and Performance Max campaigns. That means a slow redirect no longer delays the visitor, but a tracker that depends on the click passing through it must support it.

To test, use the Test button next to the template, then open a live click on a phone and check the address that arrives. Confirm your UTM values appear in your analytics reports. The attribution guide to gclid and the GA4 vs Google Ads comparison cover what to do when the numbers disagree.

Three templates you can copy

Basic UTM template: {lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={adgroupid}. This reads clean in analytics and needs no tracker.

Keyword and device template: {lpurl}?utm_source=google&utm_medium=cpc&utm_term={keyword}&utm_content={matchtype}-{device}. Use it on Search campaigns only, since {keyword} is blank for keywordless traffic.

Account template with a custom parameter: set {lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={_campaign} on the account, then give each campaign a custom parameter named campaign. Every campaign then reports a readable name instead of an ID. For help wiring this across campaigns, see Google Ads AI.

Questions

What is a tracking template in Google Ads?

It is a URL pattern that wraps your final URL and adds tracking values when someone clicks your ad. It can be set at the account, campaign, ad group, ad, keyword or sitelink level.

Do I need {lpurl} in my tracking template?

Yes for account, campaign and ad group templates. Google requires a ValueTrack parameter that inserts the final URL, and {lpurl} is the recommended one.

What is the difference between a tracking template and Final URL suffix?

The template wraps the whole URL and may route through a tracker. The Final URL suffix is appended to the final URL, so it is the safer place for parameters your landing page needs.

What are custom parameters in Google Ads?

They are values you name yourself, written as {_name}, and fill in at the account, campaign, ad group or other level. You then reference them in a template or suffix, such as geo={_geo}.

How do I test a Google Ads tracking template?

Use the Test button beside the template, which combines your final URL with the tracking setup and checks the landing page. Then click a live ad and confirm the parameters show up in analytics.

Keep going

Have Sprites do this in your Google Ads account

  • Reads campaigns, search terms, keywords and conversions
  • Drafts negatives, new ads and budget moves as cards
  • Every change waits for your approval