FREE TOOL

Google Ads Tracking Template Generator

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.

Use the key names below as-is, or rename them to match whatever your analytics/CRM tool expects.

Core ValueTrack parameters

Google click ID — needed for offline conversion imports.
Numeric campaign ID.
Numeric ad group ID.
Search only — the keyword that triggered the ad. Blank on Display/Video/Shopping.
e (exact), p (phrase), or b (broad).
m (mobile), t (tablet), c (computer).
g (Search), s (search partners), d (Display), u (unclear/other).

Paste this into Google Ads under Campaign/Ad group/Ad > Settings > Tracking template. Leave "Final URL" untouched.

What's included

utm_sourceStatic value identifying Google Ads as the traffic source.
utm_mediumStatic value identifying paid search as the medium.
gclid={gclid}Google click ID — needed for offline conversion imports.
utm_campaign={campaignid}Numeric campaign ID.
adgroup={adgroupid}Numeric ad group ID.
utm_term={keyword}Search only — the keyword that triggered the ad. Blank on Display/Video/Shopping.
matchtype={matchtype}e (exact), p (phrase), or b (broad).
device={device}m (mobile), t (tablet), c (computer).
network={network}g (Search), s (search partners), d (Display), u (unclear/other).

Runs entirely in your browser — nothing you paste here is sent anywhere.

What is a Google Ads tracking template?

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.

‍

Google Ads tracking template examples

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.
‍

1. Basic UTM tracking template

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.
‍

2. Tracking template for HubSpot

{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.
‍

3. Tracking template for Salesforce

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.
‍

4. When your final URL already has a "?"

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.
‍

5. Passing the campaign name instead of the ID

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.
‍

6. When another tool already uses your tracking template

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.
‍

Examples of broken tracking templates

The Validate my template tab above catches all five of these.

Examples of broken Google Ads tracking templates
Template What goes wrong
utm_source=google&utm_medium=cpc There's no {lpurl}, so the landing page URL breaks.
https://www.example.com/{lpurl}?utm_source=google {lpurl} already holds the full final URL, so the domain appears twice.
{lpurl}?utm_campaign={campaign_id} This isn't a ValueTrack parameter. The right one is {campaignid}.
{lpurl}?utm_term={keyword}&utm_term={matchtype} The same key appears twice. Most tools keep one value and drop the other.
{lpurl}?utm_source=google ads The space breaks the URL. Use google_ads or %20.

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.


Final URL vs. tracking template

These two settings get mixed up constantly, and the distinction matters:

  • Final URL is the actual landing page you want people to see - the one Google checks for landing page policy compliance and the one you optimize for conversions. This is the URL a human reads.
  • Tracking template wraps around the Final URL to add tracking parameters, without changing the Final URL itself. Google Ads assembles the visited URL as {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.

‍

Common ValueTrack parameters

Parameter What it captures
{gclid} Google's click ID — required if you import offline conversions or match clicks to CRM records
{campaignid} Numeric campaign ID
{adgroupid} Numeric ad group ID
{keyword} The search keyword that triggered the ad (Search only — blank on Display/Video/Shopping)
{matchtype} Keyword match type: e (exact), p (phrase), b (broad)
{device} m (mobile), t (tablet), c (computer)
{network} g (Search), s (search partners), d (Display)
{creative} The ad ID that was shown
{placement} The Display Network site or app that showed the ad
{targetid} Keyword criterion ID, or Dynamic Search Ads target ID
{random} A random number, useful for cache-busting

‍

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.

‍

Account, campaign, ad group, and keyword-level templates

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.

‍

‍

Faq

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.

‍

‍

Summary

Talk to us
DON’T TAKE OUR WORD FOR IT

Why teams trust Heeet

How Red & Yellow identified top-performing ad campaigns and reallocated spend, resulting in a 26% increase in enrolment

“If we didn’t have this tracking in place, the results on the paid-advertising side would have been worse. We probably wouldn’t have hit targets as a business.”

‍

Carl Kiessig

Senior Marketing Automations Specialist

From Vanity Metrics to Revenue Confidence driving 3x the ROAS

"It truly helps you sleep better at night. Knowing that if you've got 12 or 25 different campaigns, that each of those campaigns are net positive, and driving ROI."

Derek Martin

Partner

Heeet is a must-have for SEO analytics in Salesforce

I can see exactly which pages are driving leads, revenue… and the reporting makes it easy to measure ROI and compare with other channels without juggling multiple tools.

‍

Fátima Muñoz Peribáñez

Head of SEO

A must have for online marketers!

Heeet has been very helpful in order for us to track attribution and understand the ROI of different campaigns. When using many different marketing channels, it is sometimes challenging to know exactly which channels that "does the trick", but by using Heeet we can see where it is most profitable to invest our time (and money!) directly by looking at Salesforce data. The Salesforce integration is not only good for us, but also for our sales team who get a transparent picture of the prospect's journey before converting.

Liza Engström

Head of Marketing

Helpful tool and implementation support

Tool is very useful and the implementation team has been very helpful to get us onboarded.

Harry Kam

MarTech Lead

Great tool, great ROI

With heeet.io, we can determine which investments in paid and earned media, as well as our own content outlets, are truly impactful, and where we should focus our efforts. Having this data available across the entire customer journey within our Salesforce Org significantly enhances our marketing optimization. The product includes excellent pre-built reports and dashboards, and with the help of the superb heeet.io team, setup was a breeze.

Harald Mayer

CEO

FINALLY, A Multi-Touch Attribution App THAT WORKS!

Not only does Heeet deliver on their product claims, they also provide stellar support and direction throughout set up and long after the sale.  Their technology is clean and straightforward, their catalogue of ready-to-use reports and dashboards are robust, helpful, and reveal actionable details, and their responsiveness to questions, ideas, etc., is exceptional.  I am over-the-moon delighted and grateful to our digital guru for finding HEEET and recommend HEEET without hesitation.

Sara Slater-Smith

Business Analyst & Salesforce Administrator

A must have to follow up your paid acquisition campaigns and ROI in Salesforce.

‍

At Ringover, we use Heeet to track better (server side solution with all leads tracked) and analyse paid campaigns performance from Googles Ads, LinkedIn Ads and Facebook Ads directmy in Salesforce. With the cost we can have a ROI of our campaign on each stage of the buying funnel : Cost per lead, MQL, SQL and customers, very useful.

Vincent Coulondres

Growth Marketing Manager

Heeet is an amazing product.

Heeet has done an incredible job at ingesting data from all of the digital marketing platforms we use (Google Ads, Facebook Ads, etc). Within Salesforce, we now have a complete picture from a cost-to-acquire and LTV perspective. We know what leads are driving actual customer acquisitions and their respective costs.  Most importantly, the team at Heeet really cares. This is a group that provides incredible service and simplifies the complexities of Salesforce. Don't hesitate to work with the Heeet team on any size project you may have. They have created a gem of a product.

Farshad Tafazzoli

Chief Strategy Officer

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.

Book a demo