Google Ads tracking template generator
Pick your campaign type. Get a final URL suffix and a tracking template that only use the parameters Google fills in for that type. Already have a template? Check it here.
##Check a template you already have
Paste a tracking template or a final URL suffix to check it against Google's rules for that campaign type. It stays in your browser.
##How to use it
- Pick the campaign type. A different type changes which parameters Google will fill in.
- Say whether you use a click tracker, then tick what you want to record.
- Copy the result into Google Ads and use the Test button there. Then check that a real visit reaches your site with the parameters on it.
##Where to paste it
- Whole account: Admin, then Account settings, then Tracking Template.
- One campaign: Campaigns, then the Settings tab, then the pencil in the Tracking template column.
Google uses the most specific one it finds, so a campaign setting replaces the account one. The two do not combine.
##Which parameters work where
Limited means Google fills it in only on some channels or ad formats in that campaign type. Hotel and App campaigns have their own rules and are not covered here.
| Parameter | Search | Performance Max | Shopping | Display | Video | Demand Gen |
|---|---|---|---|---|---|---|
{campaignid}The campaign ID. |
Yes | Yes | Yes | Yes | Yes | Yes |
{creative}The ad ID. |
Yes | No | Yes | Yes | Yes | Yes |
{assetgroupid}The asset group ID. |
No | Yes | No | No | No | No |
{keyword}The keyword from your account that matched. |
Yes | No | No | Yes | No | No |
{adgroupid}The ad group ID. |
Yes | No | Yes | Yes | Yes | Yes |
{targetid}The ID of the keyword, remarketing list or product group behind the ad. |
Yes | No | Yes | Yes | No | No |
{extensionid}The asset that was clicked, such as a sitelink. |
Yes | No | Yes | No | No | Yes |
{matchtype}Match type: e exact, p phrase, b broad, a AI Max keywordless. |
Yes | No | No | No | No | No |
{search_term_matchtype}Match type of the search term: e exact, p phrase, b broad, a AI Max broad expansions and keywordless. |
Yes | No | No | No | No | No |
{placement}The site where the ad was clicked. |
No | No | No | Yes | Yes | No |
{target}A placement category, on placement-targeted campaigns. |
No | No | No | Yes | No | No |
{product_id}The product ID from your Merchant Center feed. |
No | Limited | Yes | No | No | No |
{merchant_id}The Merchant Center account that owns the ad. |
No | Limited | Yes | No | No | No |
{product_channel}Whether the product sells online or locally. |
No | Limited | Yes | No | No | No |
{product_country}The country of sale. |
No | Limited | Yes | No | No | No |
{product_language}The language of your product information. |
No | Limited | Yes | No | No | No |
{adtype}The type of Shopping ad clicked. |
No | Limited | Yes | No | No | No |
{product_partition_id}The product group the product belongs to. |
No | No | Yes | No | No | No |
{store_code}The ID of the local store. |
No | No | Yes | No | No | No |
{device}Device: m mobile, t tablet, c computer. |
Yes | Yes | Yes | Yes | Yes | Yes |
{devicemodel}The phone or tablet model. |
No | No | No | Yes | No | No |
{network}Where the click came from, such as g for Google Search. |
Yes | No | Yes | Yes | Yes | No |
{loc_physical_ms}The ID of the place the click came from. |
Yes | Yes | Yes | Yes | Yes | Yes |
{loc_interest_ms}The ID of the place the search was about. |
Yes | Yes | Yes | Yes | Yes | Yes |
{gclid}The Google click ID, for your tracker. |
Yes | Limited | Yes | Yes | No | Yes |
{random}A random number, commonly used to force a page to reload. |
Yes | Yes | Yes | Yes | No | Yes |
Checked against Google's ValueTrack page on 9 November 2026. The tool runs in your browser, and nothing you type is saved or sent anywhere.
##Questions
Should I use the final URL suffix or the tracking template?
Use the suffix if you only need parameters on your landing page. Use a template when a third-party tracker has to record the click, and keep the landing page parameters in the suffix. Google explains it in its final URL suffix guide.
Why don't my UTMs show in GA4?
With auto-tagging on, GA4 takes source, medium and campaign from the gclid, so it shows google / cpc whether your template works or not. To test the template, check the landing page URLs your site or form handler records.
Why is {keyword} blank?
Google returns it blank when an ad matches without keywords, as in AI Max for Search, Dynamic Search Ads and Performance Max. It is also blank on Shopping, where product groups show the ads.
Will changing it send my ads back to review?
Not at the account, campaign or ad group level. Edits at the ad, keyword or sitelink level do go through review, so keep routine changes at the higher levels.
The full walkthrough, with mistakes to avoid and how to test, is in the Google Ads tracking template guide.