Ad Platform Playbook
UTM Attribution Template
How to set up tracking templates in Google Ads and Microsoft Ads so every click carries the UTM parameters your analytics needs.
For · Operators setting up tracking templates or fixing broken attribution
Time · 8 min read
Next · Glossary
Your store’s analytics can tell you how much revenue came in today, but it can’t tell you which ad campaign drove each sale unless the click carries identifying parameters. A Catalyst Audit verifies that your tracking data is producing usable attribution, but it can only verify what your tracking templates actually send. Properly configured templates are the foundation.
The Short Version
- UTM parameters (
utm_source,utm_medium,utm_campaign,utm_content,utm_term) are tags appended to your ad URLs that identify the traffic source in your store’s analytics. - Tracking templates apply these parameters automatically to every ad under their scope. You set them once at the account or campaign level instead of editing individual URLs.
- Google Ads and Microsoft Ads use different macro syntax. Microsoft Ads has macros for both campaign name and ID; Google Ads only has a macro for the ID (
{campaignid}). Plan accordingly. - For Google Ads, the simplest setup is
{campaignid}at the account level and an ID-to-name lookup downstream. Manual per-campaign slugs are an alternative but require setup for every new campaign. - Catalyst Audit verifies that attribution data is flowing correctly. If your templates are misconfigured, the audit flags the data quality issue so you can fix it.
What UTM Parameters Do
UTM parameters are key-value pairs appended to a URL after a ? character. When someone clicks your ad, these parameters travel with the click and land in your store’s analytics, telling you exactly where the visit came from.
| Parameter | Purpose | Example Value |
|---|---|---|
utm_source | Which platform sent the traffic | google, bing |
utm_medium | What type of traffic | cpc (paid click), cpm (display) |
utm_campaign | Which campaign | widget-sale, spring-clearance |
utm_content | Which ad or ad group (optional) | An ad group ID or ad variation label |
utm_term | Which keyword triggered the ad (optional) | buy widgets online |
Here is what a complete URL looks like after UTM parameters are appended:
https://www.example.com/widgets?utm_source=google&utm_medium=cpc&utm_campaign=widget-sale&utm_content=ad-group-1&utm_term=buy+widgets+online
Without these parameters, your analytics sees the visit but has no way to connect it to a specific campaign or keyword. With them, you can trace every sale back to the ad that drove it.
For the full list of dynamic macros available in Google Ads, see Set up URL tracking with ValueTrack parameters.
Setting Up Tracking Templates in Google Ads
A tracking template is a formula that tells Google Ads how to build the final URL when someone clicks your ad. Instead of editing UTM parameters on every individual ad, you define the template once and it applies to all ads under its scope.
Template Hierarchy
Google Ads supports tracking templates at four levels. A template set at a lower level overrides the one set at a higher level:
- Account applies to all campaigns unless overridden
- Campaign applies to all ad groups in that campaign
- Ad group applies to all ads in that ad group
- Ad applies to that specific ad only
Setting your template at the account level is the simplest approach. Every campaign inherits it automatically. Override at the campaign level only when a specific campaign needs different tracking.
Example Template (recommended account-level setup)
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={keyword}
Breaking this down:
{lpurl}is a required placeholder that represents your ad’s final URL (landing page). Google replaces it with the actual destination URL when the ad is served. Every tracking template must start with{lpurl}or a variant like{lpurl+2}.utm_source=googleis a static value, the same for every click.{campaignid},{adgroupid}, and{keyword}are ValueTrack parameters. Google replaces them with the campaign’s numeric ID, the ad group’s numeric ID, and the search keyword at click time.
Why an ID, not a campaign name?
Google Ads has no ValueTrack parameter that resolves to the campaign name. The only campaign-level option is {campaignid}, the numeric identifier. (Google’s official ValueTrack reference lists every valid parameter.) Putting a literal {campaign} or {campaignname} into your template will not error, but it will not resolve either: those strings pass through as-is and your analytics records the literal token instead of a campaign value.
Two valid setups, with different tradeoffs:
| Approach | What goes in utm_campaign= | Pros | Cons |
|---|---|---|---|
{campaignid} (recommended) | Numeric campaign ID, e.g. 22300286124 | Set once at the account level; new campaigns work automatically; never breaks on rename | Analytics shows IDs unless you join to a name lookup |
| Manual slug per campaign | A clean string you choose, e.g. brand-trademark | Human-readable in analytics out of the box | Must be set on every new campaign; silently breaks when forgotten |
If your team already maintains a campaign-ID-to-name reference (most analytics workflows do, including ours), {campaignid} is the lower-maintenance choice. If you don’t, manual slugs give you readable analytics without a join, at the cost of per-campaign upkeep.
For complete setup instructions, see Set up your tracking template.
Setting Up Tracking Templates in Microsoft Ads
Microsoft Ads supports the same tracking template concept with a similar hierarchy: account, campaign, ad group, keyword, and ad. Lower levels override higher levels. The main differences are in macro naming conventions.
Example Template
{lpurl}?utm_source=bing&utm_medium=cpc&utm_campaign={Campaign}&utm_content={AdGroupId}&utm_term={keyword}
Microsoft Ads supports a campaign name parameter ({Campaign}, capital C) as well as a campaign ID parameter. This is the main practical difference from Google Ads.
Key Differences from Google Ads
| Element | Google Ads | Microsoft Ads |
|---|---|---|
| Campaign name parameter | (none: no ValueTrack parameter resolves to the name; use {campaignid} and join downstream) | {Campaign} (capital C) |
| Campaign ID parameter | {campaignid} | {CampaignId} |
| Ad group name parameter | (none) | {AdGroup} |
| Ad group ID parameter | {adgroupid} | {AdGroupId} |
| Ad ID parameter | {creative} | {AdId} |
| Template max length | 2,048 characters | 2,048 characters |
| Must include | {lpurl} or variant | {lpurl} or {unescapedlpurl} |
Campaigns Imported from Google Ads
If you import campaigns from Google Ads into Microsoft Ads, the imported campaigns may carry over Google’s tracking templates. Check whether the templates still reference utm_source=google. You’ll want to change this to utm_source=bing (or utm_source=microsoft) so your analytics correctly attributes Microsoft traffic.
Imported campaigns also retain their Google Ads campaign names, which may include pipes and spaces. The {Campaign} macro will URL-encode those characters in your analytics (Search | Brand | TM becomes Search%20%7C%20Brand%20%7C%20TM). If you want clean values, either use {CampaignId} and join downstream, or rename campaigns to slug-friendly strings.
Microsoft recommends setting a default tracking template at the account level so all campaigns use a consistent URL format. For the full list of available parameters and setup details, see URL Tracking with Upgraded URLs and Set up tracking templates in Microsoft Ads Help.
Setting Primary and Secondary Conversion Goals
Tracking templates carry attribution data into analytics. Conversion goals decide which tracked events drive bidding. Smart Bidding (Target CPA, Target ROAS, Max Conversions, Max Conversion Value) bids against actions marked Primary. Actions marked Secondary are recorded for reporting only.
Revisit this any time you change conversion sources, for example when you install the Google & YouTube Shopify app or switch from GA4 to a server-side feed.
Google Ads: where to find the setting
- Goals → Conversions → Summary.
- Scroll to “All your goals” and click “View all conversion actions”.
- Open any conversion action.
- Settings → Action optimization → choose Primary or Secondary. Save.
What to mark Primary
The single conversion event that means revenue.
- E-commerce: one purchase event Primary. Add-to-cart, begin-checkout, page-view stay Secondary.
- Lead generation: one qualifying form-submit or call event Primary. Newsletter sign-ups stay Secondary.
Multiple Primary actions in the same goal category inflate reported conversions and confuse the bidder. Pick one canonical source per category.
For Shopify stores using the Google & YouTube app
When you install the Google & YouTube Shopify app and link Google Ads, the app creates a Google Shopping App Purchase action and Google sets it as the account default.
| Conversion action | Designation | Why |
|---|---|---|
| Google Shopping App Purchase | Primary | App-native event; account-default per Google’s docs. |
| GA4 Purchase | Secondary | Fallback during G&Y outages or app uninstalls. |
| Server-side / Imported purchase | Secondary (or off) | Only if you’ve built a server-side upload pipeline. Keep Secondary until 30-60 days of volume parity with the Primary. |
| Add to cart, begin checkout, view item | Secondary | Reporting and audience signal only. |
Without the G&Y app, GA4 Purchase is typically the right Primary.
After changing the Primary
Smart Bidding campaigns enter a 7-14 day learning phase. Expect CPA, ROAS, and volume volatility. Don’t change other campaign settings during this window. Avoid the run-up to peak season (e.g., Black Friday for retail).
Microsoft Ads: where to find the setting
Microsoft Ads tracks conversions via the UET tag. Each UET tag carries its own list of conversion goals.
- Conversions → UET tag.
- Open the relevant tag. Shopify stores using the Microsoft Channel Shopify app will see it named ShopifyImport.
- Conversion goals → review each goal’s category and “Include in Conversions” status.
For Shopify stores using the Microsoft Channel app
The app installs five goals by default. ShopifyCheckoutCompleteTracking (category: Purchase) is the canonical primary. Leave it Active with “Include in Conversions” enabled. Pause the three auto-created duplicates to remove orthogonal signals from the Conversions column.
| Goal | Category | Recommended state | Why |
|---|---|---|---|
| ShopifyCheckoutCompleteTracking | Purchase | Active, Include = Yes | Canonical purchase signal for the bidder. |
| ShopifyAddToCart | Add to cart | Active, Include = No | Audience signal; don’t bid against an upper-funnel event. |
| Auto Created Goal - Begin checkout | Begin checkout | Paused | Orthogonal to the primary purchase signal. Pause to remove from reporting. |
| Auto Created Goal - Subscribe | Subscribe | Paused | Not a revenue event for most stores. |
| Purchase (auto-created duplicate) | Purchase | Paused | Duplicates ShopifyCheckoutCompleteTracking; pausing avoids double-counting. |
In Microsoft Ads, the “Include in Conversions” column is the bidding-eligibility flag (equivalent to Google’s Primary/Secondary). Pause unused goals rather than just unchecking Include; paused goals stay out of the reporting interface.
Microsoft Smart Bidding (Max Conversions, Target CPA) re-learns over ~7 days after a goal change, shorter than Google’s window but still worth planning around.
Common Mistakes and How to Avoid Them
URL Encoding Issues
Campaign names with pipes (|), ampersands (&), spaces, or other special characters produce URL-encoded strings that clutter your analytics. The fix: use clean, hyphenated slugs in your campaign names or tracking templates. Stick to lowercase letters, numbers, and hyphens.
Double-Tagging
Google Ads auto-tagging appends a gclid parameter to every click. If you also add manual UTM parameters, some analytics platforms may double-count or misattribute the visit. Decide which system is your source of truth for Google traffic (gclid-based auto-tagging or UTM-based manual tagging) and configure your analytics accordingly.
Forgetting to Test
Both Google Ads and Microsoft Ads provide a preview or test function for tracking templates. Use it before rolling a new template across your account. A malformed template can send every click to a broken URL, wasting spend until you notice.
In Google Ads, test your template by clicking “Test” next to the tracking template field. In Microsoft Ads, check your URLs via the URL validation tools.
Inconsistent Source Values
Pick a convention for utm_source and stick with it across all campaigns. Common choices:
- Google:
google(most common) orgoogle-ads - Microsoft:
bing(most common) ormicrosoft
Mixing conventions (e.g., google on some campaigns and googleads on others) fragments your analytics data and makes cross-campaign analysis harder.
Missing Templates on New Campaigns
When you create a new campaign, tracking templates don’t always inherit from the account level depending on how the campaign was created. After creating a new campaign, verify that the tracking template is in place by checking the campaign settings. This is especially important for campaigns created via import, duplication, or third-party tools.
What Catalyst Doesn’t Do
- Catalyst verifies that your tracking data is producing usable attribution results. It does not configure tracking templates in your ad platforms.
- Catalyst does not modify UTM parameters, tracking templates, or auto-tagging settings in Google Ads or Microsoft Ads. Those changes happen in the platform UI.
- If tracking is misconfigured or missing, the audit flags the data quality issue and points you to where to fix it.
Sources
- Set up your tracking template (Google Ads Help). Published: Continuously updated | Verified: 2026-04-18
- Set up URL tracking with ValueTrack parameters (Google Ads Help). Published: Continuously updated | Verified: 2026-04-18
- URL Tracking with Upgraded URLs (Microsoft Advertising API). Published: 2024-11-13 | Verified: 2026-04-18
- Set up tracking templates (Microsoft Ads Help). Published: Continuously updated | Verified: 2026-04-18
- Set up conversion tracking with the Google & YouTube app on Shopify (Google Ads Help). Published: Continuously updated | Verified: 2026-05-30
- Google & YouTube channel (Shopify Help Center). Published: Continuously updated | Verified: 2026-05-30
- Frequently asked questions about migrating to the Google & YouTube app (Google Ads Help). Published: Continuously updated | Verified: 2026-05-30
What’s Next
- Attribution and Data Quality: how tracking data flows from ad platforms to your store and what caveats to be aware of
- Campaign Structure Principles: campaign naming conventions interact with UTM parameters
- Bid Strategy Selection: conversion data quality determines which bid strategies are viable