If you run paid ads across multiple platforms, URL parameters are not optional.

They are how tools like PostHog, GA4, Shopify, HubSpot, and your CRM understand where a visitor came from after they leave the ad platform. Without clean parameters, paid traffic gets split across inconsistent names, conversions become harder to trace, and campaign optimization turns into guesswork.

This guide gives you platform-by-platform templates for Meta, Google Ads, Reddit Ads, TikTok Ads, Snapchat Ads, and Pinterest Ads. It also explains why the templates use campaign, ad set, ad group, and ad IDs instead of only human-readable names.

The Quick-Reference Table

Use these as starting templates.

NetworkWhere to set itTemplate to paste
Meta AdsAd level -> Tracking -> URL Parametersutm_source=meta&utm_medium=paid&utm_campaign={{campaign.id}}&utm_content={{adset.id}}&utm_term={{ad.id}}
Google AdsAd, campaign, or account level -> Tracking template{lpurl}?utm_source=google&utm_medium=paid&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={creative}
Reddit AdsAd creative -> Destination URLhttps://www.yoursite.com/page?utm_source=reddit&utm_medium=paid&utm_campaign={{CAMPAIGN_ID}}&utm_content={{ADGROUP_ID}}&utm_term={{AD_ID}}
TikTok AdsAd level -> Destination URL -> Edit -> Build URL parameters, or Auto-attach?utm_source=tiktok&utm_medium=paid&utm_campaign=__CAMPAIGN_ID__&utm_content=__AID__&utm_term=__CID__
Snapchat AdsAd level -> Website URLhttps://www.yoursite.com/page?utm_source=snapchat&utm_medium=paid&utm_campaign={{campaign.id}}&utm_content={{adSet.id}}&utm_term={{ad.id}}
Pinterest AdsAd or ad group -> Destination URL?utm_source=pinterest&utm_medium=paid&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={adid}

If the platform asks for a full destination URL, include the page URL. If the platform has a dedicated URL parameters field, paste only the parameters.

Why We Use IDs Instead of Names

The templates above use platform IDs:

  • Campaign ID.
  • Ad set ID.
  • Ad group ID.
  • Ad ID.
  • Creative ID.

IDs are useful because they are stable. Campaign names can change, ad names can be reused, and naming conventions can drift between media buyers. IDs make it easier to join your analytics data back to ad platform exports later.

Use IDs when:

  • You report in PostHog, Looker Studio, a warehouse, or spreadsheets.
  • You join ad spend to on-site conversions.
  • You care about stable attribution.
  • Campaign or ad names change often.
  • Multiple people manage the ad account.

Use names when:

  • You mainly read reports manually.
  • You want easier scanning inside analytics tools.
  • You have a strict naming convention and low reporting complexity.

The strongest setup is often both:

utm_campaign={{campaign.id}}
campaign_name={{campaign.name}}

But if you only choose one, IDs are usually safer for long-term reporting.

What Each UTM Parameter Means

utm_source

Use utm_source for the ad platform.

Examples:

meta
google
reddit
tiktok
snapchat
pinterest

Do not mix names for the same platform. If one Meta campaign uses facebook, another uses fb, and another uses meta, your reporting will split one paid source into several.

utm_medium

Use utm_medium to identify the channel type.

The original template uses:

paid

That is simple and consistent across paid platforms.

If your analytics channel grouping is more detailed, you may prefer:

paid_social
cpc
paid_search
display
paid_video

Whatever you choose, keep it consistent. utm_medium should separate paid traffic from organic traffic and referral traffic.

utm_campaign

Use utm_campaign for the campaign.

In the templates in this guide, it uses campaign ID:

utm_campaign={{campaign.id}}
utm_campaign={campaignid}
utm_campaign=__CAMPAIGN_ID__

That makes downstream joins cleaner.

utm_content

Use utm_content for the next level down: ad set, ad group, or audience grouping.

Examples:

utm_content={{adset.id}}
utm_content={adgroupid}
utm_content=__AID__

This helps you compare audiences, ad sets, and ad groups after the click.

utm_term

Use utm_term for the ad, creative, or keyword-level identifier.

Examples:

utm_term={{ad.id}}
utm_term={creative}
utm_term=__CID__

For search campaigns, utm_term often means keyword. For paid social, it may mean the ad or creative ID. Document the convention so your team reads the reports correctly.

Platform-by-Platform Setup

1. Meta Ads

In Meta Ads Manager, set URL parameters at:

Ad level -> Tracking -> URL Parameters

Paste:

utm_source=meta&utm_medium=paid&utm_campaign={{campaign.id}}&utm_content={{adset.id}}&utm_term={{ad.id}}

Meta appends these parameters to your landing page URL automatically. Do not include the base URL in this field.

Dynamic values:

  • {{campaign.id}}: campaign ID.
  • {{adset.id}}: ad set ID.
  • {{ad.id}}: ad ID.

Use this setup when you want Meta campaign, ad set, and ad IDs to appear in PostHog, GA4, Shopify, or your CRM after someone clicks the ad.

2. Google Ads

In Google Ads, use a tracking template at the ad, campaign, or account level.

Paste:

{lpurl}?utm_source=google&utm_medium=paid&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={creative}

Google tracking templates need {lpurl}. It resolves to the final landing page URL.

Dynamic values:

  • {lpurl}: final landing page URL.
  • {campaignid}: campaign ID.
  • {adgroupid}: ad group ID.
  • {creative}: creative or ad ID.

If you set the template at the account level, it can apply across campaigns automatically. That is useful when you want a baseline tracking structure for the whole account.

Before launching, preview or test the final URL. Tracking templates are powerful, but a missing {lpurl} or misplaced ? can break the landing URL.

3. Reddit Ads

In Reddit Ads, add the parameters directly to the creative destination URL.

Use:

https://www.yoursite.com/page?utm_source=reddit&utm_medium=paid&utm_campaign={{CAMPAIGN_ID}}&utm_content={{ADGROUP_ID}}&utm_term={{AD_ID}}

Dynamic values:

  • {{CAMPAIGN_ID}}: campaign ID.
  • {{ADGROUP_ID}}: ad group ID.
  • {{AD_ID}}: ad ID.

Use ? before the first parameter if the base URL has no existing query string:

https://www.yoursite.com/page?utm_source=reddit

Use & if the base URL already has parameters:

https://www.yoursite.com/page?variant=1&utm_source=reddit

If you are running catalog-based Reddit ads, make sure the required catalog setup is complete before relying on product-level campaign tracking.

4. TikTok Ads

In TikTok Ads Manager, use:

Ad level -> Destination URL -> Edit -> Build URL parameters

or TikTok’s Auto-attach option.

Manual template:

?utm_source=tiktok&utm_medium=paid&utm_campaign=__CAMPAIGN_ID__&utm_content=__AID__&utm_term=__CID__

Dynamic values:

  • __CAMPAIGN_ID__: campaign ID.
  • __AID__: ad group ID.
  • __CID__: ad or creative ID.

TikTok documents both automatic UTM attachment and manual URL parameter building. Auto-attach can be convenient, but check whether the generated values match your naming convention before applying it across the account.

5. Snapchat Ads

In Snapchat Ads, add the full destination URL in the ad-level Website URL field.

Use:

https://www.yoursite.com/page?utm_source=snapchat&utm_medium=paid&utm_campaign={{campaign.id}}&utm_content={{adSet.id}}&utm_term={{ad.id}}

Dynamic values:

  • {{campaign.id}}: campaign ID.
  • {{adSet.id}}: ad set ID.
  • {{ad.id}}: ad ID.

Because this is a full URL field, include your landing page URL before the parameters.

6. Pinterest Ads

In Pinterest Ads, add parameters at the ad or ad group destination URL level.

Use:

?utm_source=pinterest&utm_medium=paid&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={adid}

Dynamic values:

  • {campaignid}: campaign ID.
  • {adgroupid}: ad group ID.
  • {adid}: ad ID.

Pinterest supports dynamic parameters that expand when the ad is served. Test a click before launch to confirm the IDs resolve as expected.

How to Choose Between ? and &

This is one of the easiest places to make a tracking mistake.

Use ? before the first parameter:

https://www.yoursite.com/page?utm_source=meta

Use & between every parameter after that:

https://www.yoursite.com/page?utm_source=meta&utm_medium=paid&utm_campaign={{campaign.id}}

If the URL already has a ?, add new parameters with &:

https://www.yoursite.com/page?variant=test&utm_source=meta&utm_medium=paid

Many ad platforms handle this automatically when you use a dedicated URL parameters field. When you paste full URLs manually, you need to get it right yourself.

How to Verify the Setup

Do not assume the parameters work because they look right in Ads Manager.

Before launch, test:

  1. Open the ad preview or test link.
  2. Click through to the landing page.
  3. Check the final browser URL.
  4. Confirm the UTM values are present.
  5. Confirm dynamic IDs resolve instead of appearing as raw placeholders.
  6. Check PostHog Activity, GA4 realtime, Shopify, HubSpot, or your CRM.
  7. Complete a safe test conversion if possible.

In PostHog, inspect the event properties for:

utm_source
utm_medium
utm_campaign
utm_content
utm_term
$current_url
$referrer

If you use redirects, test the final destination. Redirects can strip query parameters if they are configured badly.

Common Mistakes to Avoid

Replacing dynamic IDs with static text

Do not replace {{campaign.id}}{campaignid}, or __CAMPAIGN_ID__ with the word campaign. These placeholders are meant to populate dynamically when the ad is served.

Mixing source names

Pick one source value per platform. Do not use fbfacebook, and meta in the same reporting setup unless you intentionally want them separated.

Using paid traffic without a paid medium

The original template uses utm_medium=paid. Keep paid traffic clearly separate from organic, referral, and direct traffic.

Forgetting the base URL when required

Meta’s URL Parameters field does not need the base URL. Reddit, Snapchat, and many destination URL fields do. Match the field type.

Using ? twice

Only the first query parameter starts with ?. Every later one starts with &.

Not testing dynamic macros

Unsupported or mistyped macros can pass through as raw text. Test before going live.

Skipping CRM or conversion checks

A landing page view with UTMs is only the first step. Check whether the parameters are preserved on the lead, order, signup, or opportunity.

Why This Matters for CRO and Attribution

Clean URL parameters help you connect ad spend to on-site behavior and conversions.

With consistent parameters, you can answer:

  • Which platforms send the best traffic?
  • Which campaigns create meaningful sessions?
  • Which ad sets or ad groups produce leads?
  • Which creatives influence purchases?
  • Which landing pages should be improved?
  • Which ad traffic should be included in PostHog funnels or experiments?

Without consistent parameters, the data becomes fragmented. PostHog may still capture events, but your paid traffic reports will be harder to trust.

Good URL parameters make paid media, analytics, CRO, and revenue reporting speak the same language.

Frequently asked questions

At minimum, use utm_sourceutm_medium, and utm_campaign. For paid ads, also use utm_contentutm_term, and platform IDs when available.

Use both when possible. Names are easier for humans to read, while IDs are more stable for reporting joins and attribution debugging.

Use meta if you want Facebook and Instagram traffic grouped together. Use {{site_source_name}} if you want the source to dynamically show the specific Meta placement source.

Use a consistent value such as paid_social. Avoid mixing socialcpcpaid, and paidsocial unless your analytics channel rules intentionally require it.

Often, yes. Auto-tagging with gclid helps Google systems, but UTMs can still help other tools such as Shopify, PostHog, HubSpot, and custom reports understand the campaign source.

Use Final URL suffix for parameters that should be added to the landing page URL. Use tracking templates mainly when you need third-party tracking or redirect logic.

Ad tracking parameters usually affect paid landing URLs, not canonical organic URLs. Still, avoid creating indexable duplicate pages from parameterized URLs. Use canonical tags and sensible site configuration where needed.

Yes. Redirects, checkout flows, app links, and some landing page tools can drop query strings. Always test the final conversion path.

No. Do not put emails, phone numbers, names, or private identifiers in URL parameters. URLs can be stored in logs, analytics tools, and browser history.

Click a real preview or test ad URL, inspect the final browser URL, check analytics realtime reports, and complete a safe test conversion to confirm the parameters are captured downstream.

External & Internal References

Related blog posts

Leave a Reply

Your email address will not be published. Required fields are marked *