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.

Campaign type
Do you use a click tracker?
How to label campaigns
What to record
Not available for Search (14)
  • {assetgroupid} Only for Performance Max.
  • {placement} Search ads do not fill this in.
  • {target} Search ads do not fill this in.
  • {product_id} Only for Shopping and Performance Max.
  • {merchant_id} Only for Shopping and Performance Max.
  • {product_channel} Only for Shopping and Performance Max.
  • {product_country} Only for Shopping and Performance Max.
  • {product_language} Only for Shopping and Performance Max.
  • {adtype} Only for Shopping and Performance Max.
  • {product_partition_id} Only for Shopping.
  • {store_code} Only for Shopping.
  • {devicemodel} Only for Display.
  • {gclid} Auto-tagging already adds this to your landing page. Only a tracker needs it.
  • {random} Only a tracker needs this.
Use your own parameter names

For a tracker or CRM that expects other names. Leave a box empty to keep the name shown in it.

Custom parameters optional

Your own labels, such as a line of business. Up to 8 at each level. Names use letters and numbers only, 16 at most.

Preview with your own page optional

Final URL suffix

Use this one unless a tool needs a tracking template.

utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={creative}&utm_term={keyword}&utm_matchtype={matchtype}&utm_device={device}&utm_network={network}

Tracking template

Only if a tool needs a template. Use the suffix or this, not both, or every parameter appears twice.

{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={creative}&utm_term={keyword}&utm_matchtype={matchtype}&utm_device={device}&utm_network={network}

After a click, your landing page looks like this

With sample values.

https://example.com/landing-page?utm_source=google&utm_medium=cpc&utm_campaign=1234567890&utm_content=987654321&utm_term=running+shoes&utm_matchtype=e&utm_device=m&utm_network=g
  • AI Max: when an ad matches without keywords, {keyword} comes back blank and {matchtype} returns a.

##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

    1. Pick the campaign type. A different type changes which parameters Google will fill in.
    2. Say whether you use a click tracker, then tick what you want to record.
    3. 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.