A Google Ads tracking template is the field that defines the exact URL a paid click travels through before it reaches your landing page. It wraps your final URL with ValueTrack macros so you can stamp campaign, ad group, keyword, and click identifiers onto every visit for clean attribution in analytics.
Key Takeaways
- The tracking template controls the redirect path and the macros a click carries; {lpurl} stands in for your final URL.
- Parallel tracking loads the landing page instantly while Google fires click measurement in the background, so you no longer need long redirect chains.
- The most specific level wins: keyword or ad settings override ad group, campaign, and account templates.
- The final URL suffix is the safe place for UTM parameters under parallel tracking, keeping your landing page URL clean.
- Custom parameters let you pass your own {_name} values into your analytics or third-party tracker.
- Test with the URL options Test button and click through a live ad before you trust the data.
What Is a Google Ads Tracking Template and What Does It Do?
A tracking template is a field in Google Ads that defines the URL a user is sent to when they click your ad. Instead of clicking straight to your landing page, the click is assembled from two parts: your final URL and the template that wraps it. The template is where you attach tracking macros and, in some setups, a third-party redirect.
The core macro is {lpurl}. It is a placeholder that Google Ads replaces with your final URL at click time. So a template that reads {lpurl}?utm_source=google simply means "take the landing page URL and append this query parameter." Everything you add after {lpurl} is appended to the destination the user lands on.
Under parallel tracking, this matters more than it used to. Parallel tracking is Google's default behavior where the landing page loads immediately and the click-measurement request is fired asynchronously in the background. The practical effect: you do not need a visible redirect chain to capture clicks, which used to slow page loads and hurt quality. The tracking template still exists, but its job shifted from "make the redirect happen" to "decorate the URL with the parameters your systems need."
This is distinct from conversion tracking. A tracking template is about the click URL and what it carries; conversion actions are about what happens after a user converts. You do not set up conversion actions here, and a gclid itself is simply the unique click identifier Google appends - if you need the background on that, see the gclid tracking guide. The tracking template is the mechanism that makes sure that identifier, plus your own tags, actually arrives in your analytics.
Where Can You Set a Tracking Template and Which Level Wins?
Google Ads lets you set a tracking template at several levels. The rule is simple and strict: the most specific level overrides the more general ones. If you set a template at the keyword level, it beats the ad group, campaign, and account templates for that keyword. This is how you can run a special redirect for one high-value campaign without touching the rest of the account.
| Level | Where you set it | When to use it | What it overrides |
|---|---|---|---|
| Account | Admin - Account settings - Tracking | Default template for the whole account | Nothing below it (base default) |
| Campaign | Campaign settings - URL options | One template for all ads in a campaign | Account template |
| Ad group | Ad group settings - URL options | Group-specific tracking needs | Account and campaign |
| Ad | Ad URL options - Tracking template | Per-creative redirect or tag | All of the above |
| Keyword | Keyword URL options - Tracking template | Most granular control per query | All of the above |
| Sitelink / asset | Asset URL options | Track clicks on extensions separately | Account and campaign defaults |
Because the most specific level wins, the cleanest setup is to leave the account template empty or minimal and only add templates where you actually need them. Over-layering templates is a common source of confusing, duplicated parameters. If you are debugging why a click carries the wrong tags, check the most specific object first - that is the one Google used.
What Is the Difference Between a Tracking Template, a Final URL Suffix, and Custom Parameters?
These three fields sit next to each other in the URL options panel and are easy to confuse. They do different jobs.
The tracking template defines the redirect path and any macros that wrap the destination. It is where {lpurl} lives, and where a third-party click tracker would sit if you use one. Think of it as "how the click gets built and where it goes."
The final URL suffix is a separate field that appends parameters directly to your final URL. Under parallel tracking, this is the correct and safe home for your UTM parameters. You put utm_source=google&utm_medium=cpc&utm_campaign={campaignid} in the suffix, and Google attaches it to the landing page URL without you needing a redirect. This keeps your analytics tags intact while the click still loads instantly.
Custom parameters are your own named values, written as {_name}. You define them in the custom parameters section and then reference them in the template or suffix. They are useful when you want to pass a value that has no built-in ValueTrack macro, such as a business unit code or an internal campaign nickname. Note that custom parameters are passed only through the tracking template, so they require a template even if you otherwise rely on the suffix.
In short: template is the redirect and macro wrapper, final URL suffix is the clean parameter appendage on the landing page, and custom parameters are your private {_name} values referenced from the template.
Which Valuetrack Parameters Should You Actually Use?
ValueTrack is the macro system inside the tracking template and suffix. You do not need all of them. Here are the ones that earn their place, and the caveats.
- {lpurl} - the final URL placeholder. Required if you use a template at all.
- {lpurl+2} - escapes the final URL twice for nested redirects used by some third-party trackers. Use only when a tracker demands it.
- {campaignid}, {adgroupid}, {creative} - numeric IDs that map a click back to the exact campaign, ad group, and ad without relying on names.
- {keyword} - the matched search term on Search. Empty on Display and Performance Max, so never depend on it there.
- {matchtype} - b, p, or e for broad, phrase, exact. Useful for bid and message analysis.
- {network} - g (Search), s (Search partners), d (Display). Tells you where the click came from.
- {device} - m, c, t for mobile, computer, tablet.
- {placement} - the site or app where a Display click occurred.
- {targetid} - the audience or placement target that triggered the ad.
- {loc_physical_ms} - the geographic ID of the user at click time.
- {gclid} - the click ID. Normally appended automatically; include it only if a downstream system needs it explicit.
Two traps. First, {keyword} is blank on Display and Performance Max because there is no keyword match - if your analytics logic assumes it is present, those rows break. Second, some macros are network-specific, so a macro that works on Search may be empty on Display. Build your templates to tolerate empty values rather than requiring them.
What Does a Working Tracking Template Look Like?
Concrete examples help more than theory. Here are three realistic strings. All are plain ASCII.
A pure UTM setup using the final URL suffix (the recommended modern approach). You leave the tracking template as just {lpurl} and put this in the final URL suffix:
utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={creative}&utm_term={keyword}
A template that adds a click ID and network tag while keeping the landing page intact:
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={creative}&network={network}&device={device}
A third-party click-tracker redirect where the landing page is encoded as the destination. Note the double encoding on {lpurl+2} for the tracker's own redirect:
https://tracker.example.com/click?redirect={lpurl+2}&campaign={campaignid}&adgroup={adgroupid}&creative={creative}
In the third case the user is sent to the tracker first, then to your site. That is exactly the pattern parallel tracking was designed to remove, so only use it if a vendor or attribution tool genuinely requires a server-side redirect. Otherwise, the suffix approach keeps the click direct.
How Do You Set Up and Test a Tracking Template Step by Step?
Treat this as a checklist, not a one-time toggle. This is the required sequenced playbook.
- Choose the level. Default to the campaign or account level unless one campaign needs its own redirect. Remember the most specific level wins.
- Draft the template with {lpurl} as the foundation. If you use a third-party tracker, wrap {lpurl} or {lpurl+2} as the encoded destination.
- Put your UTM parameters in the final URL suffix, not the template, so the landing page URL stays clean under parallel tracking. Reference {campaignid}, {creative}, and {keyword} as needed.
- Use the Test button in the URL options panel. Google shows the resolved click URL so you can confirm macros expand and nothing is malformed.
- Click through a live ad in an incognito window and inspect the resulting URL. Confirm the parameters land in your analytics and match the expected campaign and ad.
- Monitor for ad disapprovals and 404s for at least a few days. A template that does not resolve to a valid final URL will get ads disapproved or send users to a dead page.
Do not skip step four. The Test button surfaces encoding errors before they reach a live auction, and it is far cheaper to fix a template in the panel than to discover broken attribution a week later.
Why Do Tracking Templates Break Campaigns?
The field is powerful and unforgiving. These are the failure modes that actually happen.
- A template that does not resolve to the final URL. If {lpurl} is missing or the assembled URL is invalid, the ad gets disapproved or users hit a 404.
- Double question marks and malformed encoding. Mixing template and suffix both adding "?" creates a broken query string. Use "?" once and "&" after.
- Redirect chains adding latency. Legacy trackers that bounce through several servers slow the click and hurt the user experience, which parallel tracking was built to avoid.
- Parallel tracking breaking legacy redirect trackers. Old click trackers that depended on a visible redirect stop receiving data once parallel tracking is on. You must move their logic to the suffix or a server-side setup.
- Editing a template resetting ad learning. Changing a template can trigger a re-review and disturb optimized ads, so change during a planned window, not mid-flight on a hot campaign.
- Mismatched domains and policy issues. Redirecting through a domain that does not match the final URL can trip policy and erode trust. Keep redirects within owned and declared domains.
Most of these are preventable by keeping the template minimal, putting UTMs in the suffix, and testing before launch. For broader UTM discipline beyond Google, see the UTM tracking best practices post.
How Do Tracking Templates Fit with Utms and Server-Side Tracking?
The tracking template is the handoff point between Google's click and your measurement stack. UTMs you place in the final URL suffix are the labels your web analytics uses to attribute the session. The {gclid} and other macros are the raw signals; UTMs are the human-readable layer built on top of them.
Server-side tracking changes where those signals are processed. Instead of the browser sending everything to analytics, an event is sent to a server container that enriches and forwards it. The tracking template still does its job of stamping the click URL, but the downstream collection moves off the client. If you are building that pipeline, the same parameter discipline applies - clean, consistent names and no duplicate encodings. The server-side tagging guide covers how the click data flows into that container once the template has delivered it.
The principle that ties it together: the tracking template should be the single, predictable place where click identity is attached, so every downstream system - web analytics, server container, or third-party tracker - receives the same consistent signal. When that is true, attribution stops being a guessing game.
Frequently Asked Questions
What Is the Difference Between a Tracking Template and a Final URL Suffix?
The tracking template defines the redirect path and the macros that wrap your destination, including the required {lpurl} placeholder. The final URL suffix appends parameters directly to your landing page URL. Under parallel tracking the suffix is the recommended home for UTM tags because it keeps the click direct while still labeling the session for analytics.
Do I Need a Tracking Template If I Use Parallel Tracking?
You only need a tracking template if you must wrap the click in a redirect or use custom parameters. For plain UTM tagging you can leave the template as {lpurl} and put your UTMs in the final URL suffix. Parallel tracking already handles click measurement in the background, so a visible redirect is usually unnecessary.
Why Is My {Keyword} Parameter Empty in Analytics?
The {keyword} ValueTrack macro is populated only on Search campaigns where a keyword match triggered the ad. On Display and Performance Max there is no keyword match, so {keyword} resolves to empty. If your reporting depends on it, add a fallback or use {targetid} and {placement} to capture the Display context instead.
How Do I Test a Tracking Template Before It Goes Live?
Use the Test button inside the URL options panel in Google Ads to see the fully resolved click URL with all macros expanded. Then click a live ad in an incognito browser and inspect the landing page URL to confirm parameters reached analytics. Watch for disapprovals and 404s for several days after any change.