The Definitive Guide to Tracking Templates for Ad Platforms

Introduction

We created this guide because this question comes up with nearly every consulting client we work with: “How should we structure our tracking templates to get clean, consistent campaign data?”

Rather than answer it one-off each time, we decided to build a resource that anyone can use to get it right from the start.

Our goal is to make it easy for teams of any size to properly implement UTM tracking templates across all major ad platforms — so that your analytics system receives:

  • Clean, consistent data

  • Parameters that make cost and performance data easy to join

  • A structure that scales with your campaigns over time

Whether you’re running Google Ads, Meta, or TikTok, this guide will walk you through:

  • What a tracking template is

  • What parameters you should include

  • How to set it up efficiently (and avoid costly mistakes)

  • How to automate it for even greater reliability

Let’s get started.

Table of Contents

Section 1: What is a Tracking Template?

A tracking template is a URL format used in advertising platforms to automatically append query parameters (usually UTM tags) to your landing page URLs. These appended parameters allow web analytics tools like Google Analytics, HubSpot, Adobe Analytics, and others to:

  • Attribute sessions and conversions to the correct source/medium/campaign.

  • Group traffic in reporting dashboards by the correct marketing channel.

  • Segment users by campaign targeting (ad type, audience, creative, etc.).

Tracking templates can be applied at various levels (account, campaign, ad group, ad) and typically leverage dynamic URL parameters provided by the ad platforms (like {lpurl}, {campaignid}, {{ad.id}}, etc.) to minimize manual entry and reduce tagging errors.

Section 2: What Should Be in a Tracking Template?

Here’s a breakdown of essential parameters you should consider in your tracking templates:

Parameter Purpose When to Use
utm_source
Identifies the platform (e.g. google, facebook, twitter)
Always
utm_medium
Identifies the channel (e.g. cpc, paid_social)
Always
utm_campaign
Groups traffic under a campaign name
Always (see details below)
utm_id
Unique identifier for the campaign (helps in stable joins with ad data)
Always if supported or assigned internally
utm_term
Keyword (for search campaigns)
Use in search campaigns (Google, Microsoft)
utm_content
Ad-level differentiation (creative, placement, etc.)
Use to differentiate ads in A/B testing or creative variations
utm_source_platform
For multi-platform tools (e.g. Salesforce, Marketo Measure)
Optional
utm_creative_format
Captures ad type (video, carousel, static, etc.)
Optional
utm_effort
Tracks campaigns contributing to a shared initiative
Optional but valuable for multi-channel campaign rollups

Details on utm_campaign

Best Practices:

  • Use the exact name of the campaign as it appears in the ad platform (e.g., spring_sale_2025_nonbrand_search).

  • Keep utm_campaign platform-specific. Don’t reuse the same name across platforms like Google and Meta.

  • Avoid vague terms like ‘retargeting’ — make campaign names descriptive and structured.

Why This Matters:

  • GA4 and most analytics tools group traffic by the value of utm_campaign. Shared names lead to confusing, aggregated reporting.

  • Using consistent, structured naming improves downstream reporting and diagnosis.

Example Naming Convention:

Convention: [platform]_[targeting criteria]_[campaign type]_[goal]
Example: google_US-nonbrand_search_demos

Bonus: utm_effort

Use this custom parameter to tag campaigns across platforms that contribute to the same broader marketing initiative.

Example: utm_effort=spring_launch_2025

utm_source utm_medium utm_campaign utm_effort
google
cpc
google_US_past-purchasers-spring-launch-2025_display-retargeting_conv
spring_launch_2025
google
cpc
google_US-spring-launch-2025_nonbrand_search_conv
spring_launch_2025
bing
cpc
bing_US-spring-launch-2025_nonbrand_search_conv
spring_launch_2025
facebook
paid-social
facebook_CAN-spring-launch-2025_video_conv
spring_launch_2025
tiktok
paid-social
tiktok_US-spring-launch-2025_carousel_conv
spring_launch_2025

Section 3: How Things Go Wrong

Even the best tracking plans can break down if implemented carelessly. Here are the most common ways tracking templates go wrong:

1. Missing or Duplicated Parameters

  • Forgetting to included tracking parameters, either by not using a tracking template or forgetting to include it in the final URL at the ad or keyword level.

  • Adding UTMs both in the final URL and in a tracking template causes duplication.

2. Incorrect Use of Dynamic Variables

  • Using {lpurl} incorrectly — for example, forgetting to encode it properly or combining it with other dynamic elements in a way that breaks the URL.

  • Mixing up macro syntax: Google uses {} while Meta uses {{}}.

3. Formatting Issues

  • Extra question marks or ampersands cause malformed URLs (e.g., destinationurl.com?&utm_source=test).

4. Inconsistent Naming

  • Using paid_social in one place and Paid_Social in another splits GA4 channel data. These are case sensitive and these would be treated as two separate mediums.

5. Redirects Stripping Parameters

  • CMS platforms, redirects, and preview URLs often remove parameters unless explicitly preserved. Make sure that all redirects are set to preserve UTM and platform click ids (e.g., gclid, fbclid, etc.).

6. Analytics Misconfiguration

  • Even when UTMs are in place, if GA4 or other platforms don’t recognize your values (e.g., unregistered source/medium), traffic can fall into (other) or (not set).

Section 4: Limitations of Tracking Templates

1. No Guarantee of Load

  • If a user bounces quickly or hits a redirect, UTMs might not load.

2. Click-Only Attribution

  • UTMs only track visits, not impressions or view-through conversions.

3. Macro Limitations

  • Some platforms lack robust dynamic insertion options.

4. Hard to A/B Test

  • A/B testing can pollute reporting unless utm_content is structured carefully.

5. UTMs Are Public (rarely a concern)

  • Anyone can view or modify your UTM values, potentially exposing campaign structure.

Section 5: Setting Up Tracking Templates by Platform

Each subsection includes recommended template, setup instructions, and automation tips if applicable.

Google Ads

Best Level to Set: Campaign or account level

Template: {lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={_campaign}&utm_term={keyword}&utm_content={adgroupid}&utm_id={campaignid}

Custom Parameter Set on Each Campaign: {_campaign} = [campaign name]

Account Level Instructions:

  1. Go to each campaign and go to Settings > Campaign URL options and add the custom parameter {_campaign} and set it equal the exact name of the campaign.
  2. Go to Admin > Account Settings > Auto-tagging and ensure auto-tagging is also turned on (for gclid).
  3. Go to Admin > Account Settings > Tracking.
  4. Paste the template into the Tracking Template field.
  5. Test with the URL diagnostics tool.

Campaign Level Instructions:

  1. Go to each campaign and go to Settings > Campaign URL options
  2. Add the custom parameter {_campaign} and set it equal the exact name of the campaign.
  3. Paste the template into the Tracking Template field.
  4. Test with the URL diagnostics tool.

Best Option:

Instead of setting templates manually per campaign, or even at the account level (requiring a custom parameter to be manually set on each campaign), use a script that runs hourly that automatically maintains proper tracking templates for you.

 

Measure & Amplify Your PPC

Ready to see how PPC can deliver positive ROI?
Schedule a strategy call today. Learn how a PPC practice can help you:

  • Drive growth in your business.

  • Highlight future opportunities to scale.

  • Spend money where it delivers ROI.

  • Generate regular insights.

"*" indicates required fields

This field is for validation purposes and should be left unchanged.
Play Video
Ready for PPC ROI? Free Consultation!