Google Ads UTM Setup

Set up UTM parameters and tracking templates for your Google Ads campaigns so AnyTrack can attribute conversions to the right campaign, ad group, and keyword. Covers the recommended tracking template, required UTM parameters, ValueTrack macros, and common configuration mistakes.

UTM parameters tell AnyTrack where each click came from. Without them, conversions show up in your dashboard but lack the campaign, ad group, and keyword context you need to optimize. Setting up your Google Ads tracking template correctly takes five minutes and unlocks full attribution for every click.

Before you begin

  • You have an active Google Ads account
  • Your AnyTrack property is connected to Google Ads
  • The AnyTrack Tracking Tag is installed on your landing pages

The Recommended Tracking Template

Add this tracking template at the account level in Google Ads so it applies to all campaigns automatically:

{lpurl}?utm_source=google&utm_medium={ifsearch:cpc}{ifcontent:display}&utm_id={campaignid}&utm_content={adgroupid}&utm_term={keyword}&creativeId={creative}&adgroupid={adgroupid}&targetid={targetid}

To set it at the account level:

  1. In Google Ads, go to Settings > Account Settings
  2. Expand the Tracking section
  3. Paste the tracking template into the Tracking template field
  4. Click Save
📘

Note

Account-level tracking templates apply to all campaigns unless overridden at the campaign or ad group level. If you already have campaign-level templates, the campaign-level template takes priority.

UTM Parameter Breakdown

Each parameter serves a specific purpose in your attribution chain:

ParameterValueWhat It Tells AnyTrack
utm_sourcegoogleThe traffic source is Google Ads
utm_medium{ifsearch:cpc}{ifcontent:display}Dynamically sets cpc for Search campaigns or display for Display campaigns
utm_id{campaignid}The numeric campaign ID (auto-filled by Google)
utm_content{adgroupid}The ad group ID (auto-filled by Google)
utm_term{keyword}The keyword that triggered the ad
creativeId{creative}The specific ad creative ID
adgroupid{adgroupid}The ad group ID (passed as a standalone parameter for reporting)
targetid{targetid}The target keyword or audience ID that triggered the ad

Google replaces the {curly brace} values automatically when someone clicks your ad. These are called ValueTrack parameters. The {ifsearch:} and {ifcontent:} macros are conditional — they output different values depending on whether the click came from a Search or Display campaign.

Useful ValueTrack Macros

Beyond the parameters in the recommended template, Google Ads offers additional ValueTrack macros you can use:

MacroDescriptionExample Output
{campaignid}Numeric campaign ID12345678
{adgroupid}Numeric ad group ID98765432
{keyword}Keyword that triggered the adrunning shoes
{matchtype}Keyword match typeb (broad), p (phrase), e (exact)
{creative}Ad creative ID11122233
{targetid}Target keyword or audience IDkwd-12345678
{device}Device typem (mobile), c (computer), t (tablet)
{network}Network typeg (Google Search), d (Display)
{placement}Display network placementexample.com
{ifsearch:value}Outputs value only for Search clickscpc
{ifcontent:value}Outputs value only for Display clicksdisplay

How AnyTrack Uses These Parameters

When a visitor arrives on your landing page from a Google Ads click, AnyTrack reads the UTM parameters from the URL and stores them alongside the Click ID (atclid). When that visitor later converts, AnyTrack associates the conversion with the full campaign context.

This data flows into:

  • Your Campaign Report in the AnyTrack dashboard
  • Event attributes sent to your connected ad platforms
  • Google Ads conversion tracking via the AnyTrack server-side integration

Common Mistakes

Using campaign names instead of IDs. The {campaignid} macro returns a stable numeric ID. If you hardcode campaign names, they break when you rename campaigns and create messy data.

Overriding at multiple levels. If you set tracking templates at the account, campaign, and ad group level, only the most specific one applies. Stick to account-level unless you have a specific reason to override.

Missing the question mark. The tracking template must include ? before the first parameter (or & if your landing page URL already has parameters). The {lpurl} macro inserts your final URL, and everything after it becomes the query string.

Forgetting to test. Use the "Test" button in Google Ads tracking settings to verify your template produces a valid URL before going live.

⚠️

Warning

Do not add gclid as a UTM parameter. Google Ads appends gclid automatically through auto-tagging. Adding it manually creates conflicts and can break conversion tracking.

Google Ads UTM FAQ

FAQ was last reviewed on 2026-03-15

Yes. Auto-tagging (gclid) handles Google-to-Google attribution, but AnyTrack reads UTM parameters to attribute conversions across all your platforms, including Facebook, TikTok, and your affiliate networks. Use both for complete coverage.
AnyTrack reads all standard UTM parameters (source, medium, campaign, content, term) automatically. For custom parameters beyond these five, see Custom UTM Parameters.
No. Tracking template changes apply to future clicks only. Historical conversion data in AnyTrack and Google Ads remains unchanged.
A search keyword is the term you bid on in your Google Ads campaign. A search term is the actual query a user typed into Google that triggered your ad. For example, you might bid on the keyword 'running shoes' (broad match), but the user searched 'best running shoes for flat feet'. The keyword appears in your UTM via the {keyword} macro, while search terms are available in your Google Ads Search Terms report.