Build a Google Ads tracking template in seconds - pick your CRM and ValueTrack parameters, copy the string, or paste an existing template to catch broken ValueTrack syntax.
A tracking template is a URL pattern you set in Google Ads that tells the platform how to build the URL a click actually lands on. Instead of hardcoding tracking parameters into every landing page URL, you set one template - at the account, campaign, ad group, ad, or keyword level - and Google Ads fills in the blanks using ValueTrack parameters like {campaignid} or {gclid} at the moment someone clicks.
The result: your ads keep pointing at a clean Final URL, while the tracking template quietly appends everything your analytics, CRM, or offline conversion import needs - campaign ID, ad group ID, keyword, device, gclid, and more.
Here are six copy-paste templates for the most common setups, each with the URL a click actually lands on. Unless stated otherwise, the final URL is https://www.example.com/demo.
Use this one when your analytics or CRM tool reads standard UTM parameters.
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={creative}&utm_term={keyword}
A click on the keyword "attribution" lands on:
https://www.example.com/demo?utm_source=google&utm_medium=cpc&utm_campaign=21045837391
&utm_content=698512347712&utm_term=attribution
{keyword} is empty on Display, Video and Shopping clicks, so utm_term will be blank there.
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={creative}&utm_term={keyword}
&gclid={gclid}
HubSpot reads the five UTM parameters natively, so keep those key names exactly as written. The gclid fills HubSpot's default Google ad click ID property (hs_google_click_id). If leads come in through a custom form or the API, map gclid to that property rather than a custom field, because HubSpot's Google Ads conversion sync uses that property.
This is the generator's default output.
{lpurl}?utm_source=google&utm_medium=cpc&gclid={gclid}&utm_campaign={campaignid}&adgroup={adgroupid}
&utm_term={keyword}&matchtype={matchtype}&device={device}&network={network}
A mobile click on an exact-match Search keyword lands on:
https://www.example.com/demo?utm_source=google&utm_medium=cpc&gclid=Cj0KCQjw...
&utm_campaign=21045837391&adgroup=162334409821
&utm_term=attribution&matchtype=e&device=m&network=g
Salesforce doesn't read URL parameters on its own. A script on the landing page, or your form tool, has to copy each value into a hidden field mapped to a Lead field. Rename the keys in the generator to match what that script expects. Always keep gclid, because Google Ads uses it to match an offline conversion back to the click.
Say the final URL is https://www.example.com/pricing?plan=pro. The template doesn't change:
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}
The click lands on:
https://www.example.com/pricing?plan=pro&utm_source=google&utm_medium=cpc&utm_campaign=21045837391
When the final URL already contains a ?, Google Ads swaps the ? in your template for &. Typing & yourself only works if every final URL under that template has a query string.
ValueTrack only returns the numeric campaign ID. To get a readable name, add a custom parameter to each campaign (campaign Settings > Campaign URL options > Custom parameter). For example, use the name campaign and the value brand_search_fr, then reference it with an underscore:
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={_campaign}&utm_id={campaignid}
The click lands on:
https://www.example.com/demo?utm_source=google&utm_medium=cpc&utm_campaign=brand_search_fr&utm_id=21045837391
Custom parameter names take letters and numbers only, up to 16 characters, and values can't contain spaces. You can't set them at account level, but the template that uses them can live there.
Click-fraud tools and third-party click trackers often ask you to paste their own tracking template. Google Ads applies one template per click, so adding yours at the same or a more specific level replaces theirs. Leave their template alone and put your parameters in the Final URL suffix (same Campaign URL options panel), with no {lpurl} and no leading ?:
utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_term={keyword}
Google Ads appends the suffix to the final URL, and their template keeps running in the background.
The Validate my template tab above catches all five of these.
Summary (replaces the empty H2 and its # link)
A Google Ads tracking template is {lpurl}, a ?, and the parameters you want on every click, separated by &. Set one at account level, override it only where a campaign needs something different, and validate it before you save.
A template only tags the click, though. When a lead fills in your form three visits later, a hidden field that reads the current URL has nothing left to read. Heeet captures UTMs and gclid on every visit and writes the full touchpoint history to Salesforce or HubSpot, so you see which campaigns and keywords actually turn into pipeline and revenue.
These two settings get mixed up constantly, and the distinction matters:
{lpurl} (a placeholder for your Final URL) plus whatever you append in the template.Keeping tracking logic in the template - rather than pasted into every Final URL - means you can update tracking for an entire account or campaign in one place, without touching thousands of individual ads.
Use the generator above to turn any combination of these into a ready-to-paste template - it also lets you rename each key (e.g. adgroup → ad_group_id) to match whatever your CRM's hidden form fields expect.
Google Ads lets you set a tracking template at five levels: account, campaign, ad group, ad, and keyword/final URL. Only one level applies per click - Google Ads doesn't merge templates from multiple levels. It always uses the most specific template available for that click: a keyword-level template overrides ad-level, which overrides ad group-level, which overrides campaign-level, which overrides an account-level default.
In practice, most accounts set a single account-level template covering the parameters they always want (gclid, campaign, device, network), and only add a campaign- or ad group-level override when a specific campaign needs different tracking - for example, a different CRM destination or an extra static parameter for a partner feed.
Do tracking templates affect Quality Score? No. Google Ads states that testing or changing a tracking/redirect template does not directly affect Quality Score or ad rank. What it can affect is delivery: if a template is malformed and the resulting URL returns an error, Google Ads can flag it as a "redirect error," pause the affected ads, and indirectly hurt landing page experience. Validate your template before saving it, and re-check it any time you edit it.
Account-level vs. campaign-level templates - which should I use? Set an account-level template for the parameters every campaign should always send (gclid, device, network, campaign/ad group IDs). Only add a campaign- or ad group-level template when that specific campaign needs something different - since Google Ads uses the most specific level only, a campaign-level template completely replaces the account-level one for that campaign, it doesn't add to it.
Does the tracking template need to start with {lpurl}? Yes, in almost every case. {lpurl} is the placeholder for your Final URL. Templates that don't start with it, or that hardcode a http:///https:// domain alongside it, typically produce a broken or doubled-up URL.
How do I test a tracking template before it goes live? In Google Ads, open the tracking template field and click "Preview" - it shows the fully resolved URL for a sample click. You can also paste your template into the "Validate my template" tab above to catch missing {lpurl}, unrecognized ValueTrack parameters, duplicate keys, and other common mistakes first.
What happens if my tracking template is invalid? Google Ads will usually reject an obviously broken template at save time. Subtler issues - an unrecognized parameter, a duplicate query key, a missing value - can slip through and only surface later as a redirect error or as broken attribution data in your CRM, which is what the validator above is built to catch early.
Ready to track prospects from lead to close with Heeet?
Heeet gives marketers and sales professionals at IT & Security firms turn geuss work intro informed decisions that drive revenue while meeting the same secruity technical standards you provide your clients.
