Tracking guide

UTM parameters for Facebook ads: a template, and the mistakes to avoid

Where UTM tags go in Meta Ads Manager, what each dynamic parameter outputs, a template to paste, how GA4 and Shopify read it and the mistakes that break tracking.

Guide · No. 06

Reading time
8 minutes
Updated
Topic
Tracking

The short version

  • UTM parameters are tags on each ad's link that tell GA4, Shopify and other tools which ad sent each visit, so you can compare creatives outside Ads Manager.
  • Add them in the ad's URL parameters field rather than pasting them into the website URL.
  • Meta's dynamic parameters fill in campaign, ad set and ad names or IDs automatically, so one template works for every ad.
  • Use lowercase, no spaces and a paid medium such as paid, so GA4 files the visits under paid social.
  • Test the final link before launch: redirects and duplicated tags quietly break tracking.

What UTM parameters are, and what they aren't

UTM parameters are short tags added to the end of a link. When someone clicks your ad and lands on your site, your analytics tool reads the tags and records where the visit came from. Five are standard, and GA4 reads a few extras — the useful one here is utm_id:

Parameter The question it answers Typical value for Meta ads
utm_source Which site sent the visit? facebook
utm_medium What kind of traffic is it? paid
utm_campaign Which campaign? {{campaign.name}}
utm_content Which ad? {{ad.name}}
utm_term Anything else worth knowing? {{adset.name}}
utm_id Which campaign, by ID? (read by GA4) {{campaign.id}}

What UTMs don't do matters just as much:

  • They don't feed Meta's optimisation. Meta optimises on data from your Pixel and Conversions API. UTMs are for your other tools.
  • They don't count sales on their own. They label visits. Your analytics tool decides which visit gets credit for a purchase.
  • They won't match Meta's numbers. Meta counts conversions within its own attribution windows, which can include people who saw an ad without clicking. GA4 and Shopify credit visits across all your channels using their own rules. Use UTMs to compare ads inside one tool, not to reconcile totals between tools.

Where to put UTMs in Meta Ads Manager

At the ad level, below the destination settings, there's a tracking section with a field for URL parameters. Meta has labelled it "URL parameters" for years, with a "Build a URL parameter" helper beside it, but the layout moves around — look near the website URL.

Paste your parameters there, without a leading question mark:

utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}}&utm_content={{ad.name}}

When someone clicks, Meta adds them to your website URL. Why use this field rather than pasting everything into the website URL?

  • The link stays clean. You can change the landing page without retyping the tracking, and the other way round.
  • No hand-joining. Typing tags onto a link that already contains a "?" is an easy way to end up with two question marks and broken tags. A separate field avoids that.
  • Copies keep it. Duplicated ads carry the same parameters, and dynamic values fill in correctly for each copy.

Pasting tags straight into the website URL does work, and some people do it. The one thing not to do is both: tags in the link and in the field give you duplicate parameters, and tools disagree about which one counts.

In bulk, the Import/Export spreadsheet has a column for URL tags (see our bulk upload guide). In Meta's API the same field is called url_tags. Meta also adds its own click ID, fbclid, to outgoing clicks. Leave it alone — some tools, including Meta's own tracking, use it.

Meta's dynamic URL parameters

Dynamic parameters are placeholders in double curly brackets. Meta swaps in the real value when someone clicks, so a single template tags every ad correctly.

Parameter What it outputs Example
{{campaign.id}} The campaign's ID A long number that never changes
{{campaign.name}} The campaign's name sales_in_prosp_test_260930
{{adset.id}} The ad set's ID A long number
{{adset.name}} The ad set's name broad_18-65-all_auto_260930
{{ad.id}} The ad's ID A long number
{{ad.name}} The ad's name serum_c014_prob_q_img_4x5_ai_v1_260930
{{placement}} Where the ad was shown A placement label such as Facebook_Mobile_Feed or Instagram_Stories
{{site_source_name}} Which Meta app showed it A short code such as fb, ig, msg or an (Audience Network)

A few practical notes:

  • Names come through as they are. Spaces get encoded (as %20 or +) and capitals stay capitals, which is why a tidy naming convention matters.
  • IDs survive renames, names don't. Rename an ad and new clicks carry the new name, so your reports split in two. IDs never change.
  • The list changes. Meta adds options from time to time. The URL parameter builder in Ads Manager shows the current set.

A UTM template for Meta ads

This template suits most accounts. Paste it into the URL parameters field of every ad:

utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}}&utm_content={{ad.name}}&utm_term={{adset.name}}&utm_id={{campaign.id}}

Why each part:

  • utm_source=facebook for all Meta traffic, Instagram included, so it sits together in your reports. If you want Instagram split out, swap utm_term to {{site_source_name}} or {{placement}} rather than changing the source.
  • utm_medium=paid so analytics tools treat it as paid traffic. paid_social and cpc work too, but social doesn't (more below).
  • utm_campaign={{campaign.name}} so campaigns are readable in reports.
  • utm_content={{ad.name}} so every ad can be told apart — and with a good naming convention, you can split by angle, hook or format.
  • utm_term={{adset.name}} for the audience. The tag was designed for search keywords, but using it for the ad set is common practice.
  • utm_id={{campaign.id}} gives GA4 a campaign ID that survives renames.

Names or IDs?

Every level can pass either its name or its ID, and each has a job:

Names, such as {{ad.name}} IDs, such as {{ad.id}}
Readable in reports Yes No — you need a lookup
Survives a rename No Yes
Carries your naming convention Yes No
Best for Day-to-day analysis in GA4 or Shopify Joining analytics data to Meta exports

The template above uses names where you'll read the reports and the campaign ID as a stable key. If your team renames ads often, switch utm_content to {{ad.id}} and look names up in an Ads Manager export when you need them.

After a click, the landing page URL looks something like this:

https://example.com/products/serum?utm_source=facebook&utm_medium=paid&utm_campaign=sales_in_prosp_test_260930&utm_content=serum_c014_prob_q_img_4x5_ai_v1_260930&utm_term=broad_18-65-all_auto_260930&utm_id=120212345678901234

The free UTM builder puts this together for you, with Meta's dynamic parameters built in, and builds matching ad names.

Reading results by ad in GA4 and Shopify

GA4

GA4 reads each tag into its own dimension. Labels have changed over the years, but at the time of writing they are:

Tag GA4 dimension (session scope)
utm_source Session source
utm_medium Session medium
utm_campaign Session campaign
utm_content Session manual ad content
utm_term Session manual term
utm_id Session campaign ID

GA4 also sorts traffic into default channel groups. Under its default rules, a visit lands in Paid Social when the source is a recognised social site (facebook and instagram both are) and the medium looks paid — paid, cpc, ppc and similar.

To compare ads, build an exploration with Session manual ad content as the dimension and sessions, purchases and revenue as metrics. Remember that GA4 is case-sensitive: Facebook and facebook are two different sources.

Shopify

Shopify reads UTM parameters on the landing URL to attribute sessions and orders to marketing channels and campaigns in its marketing reports, and an order's conversion details can show the visit that led to it, including its UTM values. Shopify reworks its analytics often, so report names vary by plan and version — look for the marketing or acquisition reports.

Two Shopify-specific checks:

  • Link straight to the store's domain. A detour through a link shortener or another domain can drop the tags.
  • Test your redirects. Market, currency or language redirects should keep the query string. Click your own tagged link and check.

How to test your tags before you spend

Five minutes of checking before launch saves a month of muddled reports:

  1. Build a test link by hand. Take the website URL, add a question mark and your template, and replace each dynamic parameter with a sample value, such as utm_campaign=test-campaign.
  2. Open it on your phone. Check that the page loads, the right product appears and, after any redirect, the parameters are still in the address bar.
  3. Check that your analytics sees it. Open the link in a private browser window, so you count as a new visitor, then look for the visit in GA4's real-time report with your test source and medium.
  4. Tap through a real preview. Once the ad is built, preview it on your phone from Ads Manager, tap the button and check the final URL. Meta's preview options change, but there's usually a way to send a preview to your own feed or device.
  5. Check again after launch. When the ad has a few clicks, look for its name under manual ad content in GA4. If you see (not set) or odd values, fix the template now rather than at the end of the month.

Common mistakes

Mistake What happens Fix
Spaces or special characters in names Encoded clutter like %20 in reports, and an & inside a value can split it in two Lowercase names with underscores and hyphens only
Inconsistent case Facebook, facebook and FB become three sources Pick lowercase and stick to it
utm_medium=social on paid ads GA4 files paid clicks under Organic Social Use paid, paid_social or cpc
Tags in both the website URL and the URL parameters field Duplicate parameters. Tools disagree about which counts Keep tags in one place: the URL parameters field
UTM tags on your own site's internal links They can take credit away from the ad that brought the visitor Never tag internal links
Hand-typed values copied into new ads Last season's campaign name on this season's ads Use dynamic parameters instead of typed names
A redirect strips the query string Visits lose their campaign and ad details Click a tagged test link and check the address bar once the page loads
Personal data in tags Emails or phone numbers end up in URLs, and Google's policies forbid sending them to GA4 Never put personal data in URL parameters

How BulkAds tags ads automatically

When you launch through the BulkAds bulk ad launcher, every ad is tagged for you, in the ad's URL parameters — where you'd put them yourself:

Tag Value
utm_source facebook
utm_medium paid
utm_campaign The campaign's name, as it was at launch
utm_content A short ID for the creative, such as 8f3a2c1d

Under GA4's default rules, that files the visits under Paid Social. Shopify and any other tool that reads UTMs can group them by campaign, and the creative ID tells each ad apart. For campaigns you build yourself, the UTM builder makes consistent tags and ad names.

Questions people ask

Where do I add UTM parameters in Facebook Ads Manager?

At the ad level, in the tracking section near the website URL, there's a URL parameters field. Paste your parameters there without a leading question mark. Meta adds them to the link when someone clicks.

What are Meta's dynamic URL parameters?

Placeholders such as {{campaign.name}}, {{adset.name}}, {{ad.name}}, their ID versions, {{placement}} and {{site_source_name}}. Meta swaps in the real values when someone clicks, so one template tags every ad correctly.

Should utm_source be facebook or instagram for Instagram ads?

Many advertisers use facebook for all Meta traffic and split Instagram out with {{site_source_name}} or {{placement}} in another parameter. Whatever you pick, keep it lowercase and consistent.

What utm_medium should I use for Facebook ads?

A paid value such as paid, paid_social or cpc. Under GA4's default channel rules, a medium like social puts paid clicks into Organic Social.

Why don't my GA4 numbers match Meta Ads Manager?

They count differently. Meta uses its own attribution windows, which can include people who saw an ad without clicking, while GA4 credits visits across all your channels with its own model. Compare ads within one tool rather than reconciling totals.

Do UTM parameters affect ad delivery or performance?

No. Meta optimises on its Pixel and Conversions API data, not on your UTM tags. Just make sure your landing page still loads correctly with the parameters attached.

Keep going

Written by the BulkAds team. Published , last checked . Meta changes its tools often — if something here no longer matches Ads Manager, tell us at contact@bulkadsai.com.

BulkAds AI is an independent product and is not affiliated with, endorsed or sponsored by Meta Platforms, Inc. Facebook and Instagram are trademarks of Meta Platforms, Inc.

Your next fifty ads are one link away.

Paste your website, meet your brand kit and see your first batch in minutes. 7 days for $9.99 — cancel anytime.

yourbrand.comMake my ads

See pricingExplore featuresBrowse the library