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.
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:
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_campaignplatform-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
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_socialin one place andPaid_Socialin 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_contentis 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:
- 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. - Go to Admin > Account Settings > Auto-tagging and ensure auto-tagging is also turned on (for gclid).
- Go to Admin > Account Settings > Tracking.
- Paste the template into the Tracking Template field.
- Test with the URL diagnostics tool.
Campaign Level Instructions:
- Go to each campaign and go to Settings > Campaign URL options
- Add the custom parameter
{_campaign}and set it equal the exact name of the campaign. - Paste the template into the Tracking Template field.
- 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. A PPC practice helps you drive growth in your business, highlight future opportunities to scale, spend money where it delivers ROI, and generate regular insights.
Free Consultation!