Skip to content
Back to Blog
Ad Launching

Facebook UTM Parameters: A Copy-Paste Template and the Mistakes That Break Attribution

Caner MoralFounder, AdRiseLab
Nov 25, 202612 min
TL;DR

Facebook UTM parameters are tags on a Meta ad's link that tell your analytics which campaign and ad sent a visit. Paste utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.id}}&utm_content={{ad.id}} into the URL parameters field under Tracking at the ad level in Ads Manager. Meta supports nine dynamic parameters, including {{campaign.name}}, {{placement}} and {{site_source_name}}. Name values are stored when the ad is first published and do not follow a rename, while IDs never change. In GA4, use facebook, fb, ig or instagram as the source: meta is not on Google's list of social sources, so a meta source with a paid medium meets only the Paid Other definition.

9
dynamic URL parameters Meta lists for Ads Manager, one of them for Advantage+ catalog ads only
Source: Meta Business Help Center, Specifications for dynamic URL parameters, read Nov 25, 2026
5
values {{site_source_name}} can return: fb, ig, msg, an and th
Source: Meta Business Help Center, Specifications for dynamic URL parameters, read Nov 25, 2026
2 of 5
of those values on Google's list of social sources (fb and ig), which GA4 needs for Paid Social
Source: Google Analytics Help, default channel group and source categories list, read Nov 25, 2026
11
placement values in Meta's table for the {{placement}} parameter
Source: Meta Business Help Center, Specifications for dynamic URL parameters, read Nov 25, 2026
Facebook UTM Parameters: A Copy-Paste Template and the Mistakes That Break Attribution, AdRiseLab Blog

Facebook UTM parameters are tags added to the end of a Meta ad's link, so that your analytics tool and your store can tell which campaign and which ad sent each visit. This is the line to paste into the URL parameters field, under Tracking at the ad level in Ads Manager:

utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.id}}&utm_content={{ad.id}}

Meta replaces the two values in double braces with the campaign's ID and the ad's ID when the ad is rendered, so one line works for every ad. Every Meta rule in this guide was read from Meta's own help pages and developer documentation on November 25, 2026, and every GA4 rule from Google's help pages the same day.

What are Facebook UTM parameters?

They are pairs of a key and a value, joined by an equals sign and separated by ampersands, that travel on the URL a person lands on after clicking your ad. Google Analytics and most store and attribution tools read them from the address and file the visit under that source, medium, campaign and ad.

Google's help page lists the keys GA4 reads: utm_source for the referrer, utm_medium for the marketing medium, utm_campaign, utm_id for a campaign ID, utm_content to tell creatives apart, utm_term for a paid keyword, and utm_source_platform. Google says to always set utm_source, utm_medium and utm_campaign, and that a missing parameter shows up as (not set) in reports.

On Meta you do not edit the website link to add them. Ads Manager has a separate URL parameters field, and its contents are appended to the website URL on every click. Dynamic parameters, written in double braces, are filled in by Meta from the ad itself. Meta also attaches its own click ID, fbclid, to clicks on Facebook and Instagram ads, and its developer documentation says the click ID does not affect the tracking parameters you set. Meta uses that ID for attribution when you send it back; your UTM tags are what your own analytics reads as campaign and ad.

What UTM template should you use for Facebook ads?

Use the four-key line above when you want to connect visits and sales to ad spend, and swap the IDs for names when people read the report by eye. What each key records, and why it has this value:

KeyValueWhat it recordsWhy this value
utm_sourcefacebookWho sent the visitIt is on Google's list of social sources, which GA4 needs for Paid Social
utm_mediumpaid_socialThat the click was paidGA4's paid rule matches any medium that starts with paid
utm_campaign{{campaign.id}}The campaignThe ID stays the same when the campaign is renamed
utm_content{{ad.id}}The adIt is the ID Meta's own reporting uses for the ad, so spend joins to it
A Facebook UTM template broken into its four keys: utm_source=facebook, utm_medium=paid_social, utm_campaign={{campaign.id}} and utm_content={{ad.id}}, with what each one records
Dynamic parameters from Meta's Business Help Center; channel rules from Google Analytics Help. Read November 25, 2026.

You can change two of the values. The source could also be fb, ig or instagram, which are on Google's list too; meta is not, as the first mistake below explains. The medium could be paid, cpc or paid-social, since GA4's paid rule matches all of them. Pick one spelling of each and use it on every ad.

If you read campaigns by name in GA4, use this version instead:

utm_source=facebook&utm_medium=paid_social&utm_id={{campaign.id}}&utm_campaign={{campaign.name}}&utm_content={{ad.name}}

It puts the campaign ID in utm_id, the key Google defines for a campaign ID and recommends setting, so a readable name and a stable ID arrive together. The ad is identified only by name, which is fine for reading and weaker for matching, for the reason given in the names section below. You can carry the ad set in utm_term with {{adset.name}}. GA4 defines utm_term as the paid keyword, so expect the column to carry that label.

Which dynamic parameters does Meta support?

Meta's Ads Manager specifications list nine: three IDs, three names, the placement, the app the ad ran in and, for Advantage+ catalog ads only, the media type. Meta documents no others.

ParameterWhat Meta fills inNotes
{{campaign.id}}The campaign's IDNever changes
{{adset.id}}The ad set's IDNever changes
{{ad.id}}The ad's IDNever changes
{{campaign.name}}The campaign's nameThe name used at first publish
{{adset.name}}The ad set's nameThe name used at first publish
{{ad.name}}The ad's nameThe name used at first publish
{{placement}}Where the ad was shownFor example facebook_feed or instagram_stories
{{site_source_name}}Which app showed the adfb, ig, msg, an or th
{{media_type}}The media typeAdvantage+ catalog ads only
Meta's nine dynamic URL parameters: three IDs, three names fixed at first publish, placement, site source name and media type for Advantage+ catalog ads
Meta Business Help Center, Specifications for dynamic URL parameters, read November 25, 2026.

Meta's developer documentation for url_tags, the API field behind the URL parameters box, lists the first six. The placement, site source and media type parameters appear on the Ads Manager page.

For {{placement}}, Meta's table lists eleven values: audience_network_classic, audience_network_rewarded_video, facebook_feed, facebook_instream, facebook_marketplace, facebook_right_column, instagram_feed, instagram_stories, messenger_inbox, messenger_sponsored_messages and threads_stream. If your ads also run in placements outside that table, check what arrives for them before you build a report on this value. For {{site_source_name}} the values are an for Audience Network, fb for Facebook, ig for Instagram, msg for Messenger and th for Threads.

The same page sets limits. Dynamic parameters do not work for collection ads on Instagram placements. App promotion campaigns have no URL parameters field; the parameters go at the end of the deferred deep link. With a catalog in a Sales campaign, or Store Locations in an Awareness campaign, there is only the URL parameters field and no website URL field. All six objectives support dynamic parameters, some only with certain performance goals or conversion locations.

Should you use campaign names or IDs in UTMs?

Use IDs when the goal is to match visits and sales to spend, and names when the goal is a report people can read. Names are frozen when the ad is first published; IDs never change.

Meta's developer documentation says that when you first publish an object, “we store the name values used in a snapshot”, and name-based parameters read from that snapshot afterwards. The Ads Manager page spells out the consequence: you can rename a campaign, ad set or ad, but the parameter keeps the original name for the life of that object. To change the value, you publish a new one.

Worked example: a campaign published as test-broad on November 3 and renamed scale-broad on November 12 still sends utm_campaign=test-broad, while its ID stays the same
Worked example. The rule is Meta's; the names and the ID are made up.

Worked example. A campaign goes live on November 3 as test-broad and is renamed scale-broad on November 12. Clicks after the rename still arrive with utm_campaign=test-broad, a name that no longer exists in Ads Manager, while {{campaign.id}} sends the same number on both days.

DateName in Ads Manager{{campaign.name}} in the URL{{campaign.id}} in the URL
Nov 3, publishedtest-broadtest-broad120200000000000001
Nov 12, renamedscale-broadtest-broad120200000000000001

IDs also join cleanly. A spend export that includes the ad ID lines up with visits and orders tagged with the same ID, one row per ad, while two ads called video-1 in different campaigns look like one ad in a report keyed on names. Names are better when someone reads GA4 without a lookup table, which is why the second template carries both.

How should you name campaigns if names go into your UTMs?

Decide the name before you publish, because the URL keeps it afterwards. These habits keep name-based values usable:

  • Lowercase only. GA4 treats facebook and Facebook as different values, and the same goes for campaign and ad names.
  • Hyphens or underscores instead of spaces. Meta's own example shows a space arriving as %20.
  • One fixed order of fields, for example objective, audience, offer and date, so names sort and filter predictably.
  • Leave the words shop and shopping out of campaign names if you read GA4 channels. A campaign name containing them, with a paid medium, also meets GA4's Paid Shopping definition.

Where do you add URL parameters in Ads Manager?

At the ad level, in the Tracking section, in the field called URL parameters. Keep the website URL to the page address and put every tag in that field.

Meta's steps, as read on November 25, 2026:

  1. 1.Create a campaign in Ads Manager, or open one saved as a draft.
  2. 2.Work through the ad creation steps until you reach Tracking for the ad.
  3. 3.Paste the line into the URL parameters field. To build it key by key instead, click Build a URL parameter, enter each key and value, and click Apply.

The same page says that parameters in the URL parameters field are appended to the website URL unless they repeat a key that is already there, and when they do, the field wins. Meta's example has utm_source=1 in the website URL and utm_source=2 in the field, and only utm_source=2 reaches the final URL. Adding parameters in Ads Manager also overrides parameters set elsewhere, such as Instagram's default URL parameters.

If you promote an existing post, the parameters apply only to clicks on the ad, not to clicks from people who see the post organically. You can edit the field after the ad is published, but Meta warns that the ad set may re-enter the learning phase, so set it before launch. Through the Marketing API, the same value goes into the url_tags field of the ad creative.

Why are my Facebook UTMs not showing up correctly in GA4 or Shopify?

Check these seven mistakes in order. Each one either drops the tags before they reach your site or files the visit somewhere you are not looking.

Seven UTM mistakes and the fix for each: an unrecognized source, mixed spellings, wrong brace syntax, duplicate keys, empty values, redirects that drop the query string, and edits after launch
From Meta's Business Help Center and Google Analytics Help, read November 25, 2026.

1. A source GA4 does not recognize

Why it breaks: GA4's Paid Social definition needs a source on Google's list of social sites and a paid medium. Google's list, read on November 25, 2026, includes facebook, fb, instagram, ig and messenger, but not meta, msg, an or th. A click tagged utm_source=meta&utm_medium=paid_social meets only the Paid Other definition, so Meta spend shows up under Paid Other. The same goes for {{site_source_name}}: Facebook and Instagram clicks arrive as fb and ig and count as social, while Messenger, Audience Network and Threads clicks arrive as msg, an and th and do not.

Which GA4 default channel definition a Meta click meets: facebook, fb, ig or instagram with paid_social meet Paid Social; meta, msg, an or th with paid_social meet only Paid Other; facebook with social meets Organic Social
Google Analytics Help, default channel group and its source categories list, read November 25, 2026. Manual tags only.

Fix: use facebook, fb, ig or instagram as the source. To keep meta, create a custom channel group in GA4 (Admin, Data display, Channel groups) with a channel that matches it, placed above Paid Other, since Google says traffic goes to the first channel whose definition it matches. Custom groups apply to past data too; a standard property can have two, and creating one takes Editor access. The medium matters as well: utm_medium=social does not match the paid rule, so a paid click tagged that way meets the Organic Social definition.

2. Mixed spellings of the same source

Why it breaks: Google says parameter values are case sensitive, so facebook, Facebook and fb become separate rows in a source or campaign report. Channel definitions ignore case, so the channel total survives, but every breakdown by source or campaign is split. Meta may add values of its own: its help pages say that since January 1, 2024, ad traffic may carry an automatic source of Facebook or Instagram, a medium of paid, and the ad, ad set, campaign and campaign tracking group IDs, without naming the keys.

Fix: one template on every ad, all in lowercase. Then click an ad without parameters of your own to see which automatic values arrive.

3. The wrong brace syntax

Why it breaks: each ad platform has its own syntax. Google Ads writes the campaign ID as {campaignid}, with single braces; Meta uses {{campaign.id}}. Meta documents only the names on its list, so Google's syntax or a guessed name such as {{campaign_name}} will not turn into the value you expect.

Fix: copy names from Meta's list above, and after launch check the clicked URL for anything still in braces.

4. The same key in the website URL and in the URL parameters field

Why it breaks: Meta keeps the value from the URL parameters field and drops the duplicate in the website URL, so a utm_campaign typed by hand into the link is lost when the field also sets one.

Fix: keep only the page address in the website URL and every tag in the URL parameters field.

5. Empty values

Why it breaks: a key with nothing after the equals sign carries no information. Meta's help page warns against it, with background=&foo=bar as its example, and Google says a missing UTM parameter shows up as (not set) in reports.

Fix: give every key a value, or delete the key.

6. A redirect that drops the query string

Why it breaks: the tags live in the part of the address after the question mark. If the landing URL redirects, say from http to https, to www or to a country store, and the redirect does not carry that part over, the tags are gone before the analytics script loads. Meta notes a related limit: a URL parameter covers only the first page reached from the ad, so a later visit on the visitor's own carries none.

Fix: use the exact final URL as the website URL, and test a real click rather than the value in the editor.

7. Editing tags on a live ad

Why it breaks: Meta says changing URL parameters after publishing may send the ad set back into the learning phase, and name-based values cannot change for the life of the object anyway. A correction can cost delivery and still leave the old names in the URL.

Fix: settle the template before launch. For a live ad with wrong tags, weigh cleaner data against a new learning phase, or fix it in the next round of ads.

How do you check your UTMs before spending money?

Open a preview of the ad, click through, read the address bar, and confirm your analytics recorded the visit under the right source, medium and campaign. Meta fills dynamic values when the ad is rendered, so repeat the click once the ad is published.

  1. 1.In Ads Manager, open the ad preview, select Share and copy the preview link. On an iPhone you can send the preview to the Facebook app as a notification instead; Meta says that option is not available on Android or on Instagram.
  2. 2.Click through and read the address bar. Every key should appear once, with a value, and nothing should still be in braces, plain or encoded as %7B.
  3. 3.In GA4, open the Realtime report. Its cards show the first user source, medium and campaign for the last 30 minutes, so test from a private browser window, where you arrive as a new user.
  4. 4.If your store credits sales to campaigns, place a real order after a click and check that the order shows the source.

How does AdRiseLab use UTM parameters?

AdRiseLab writes a fixed UTM line into every ad it launches, and its Revenue view uses the ad ID in that line to credit store sales to ads. As of November 25, 2026, when you confirm a launch in the campaign builder, each ad's creative is created with this value in url_tags:

utm_source=meta&utm_medium=paid_social&utm_campaign={{campaign.id}}&utm_content={{ad.id}}

Revenue records visits with a script on your site and takes sales from Stripe or Shopify. It reads a number in utm_content as the ad's ID; a name there is kept as a label and not matched to an ad. For each sale it looks at that visitor's visits in the 30 days before the payment, credits the sale to the latest one that was not direct, and shows it next to the ad's spend and next to the purchases Meta reports for the ad, as two separate measurements. A click on Monday followed by a purchase from a bookmark on Thursday is still credited to the ad.

For ads built by hand in Ads Manager, Revenue's settings show the same line to copy into the URL parameters field. Without it, a Meta visit still counts as paid social from Meta's click ID but carries no ad ID, so that ad's spend sits next to zero website revenue. To test the chain, place a real order after a click and find it under Transactions in Revenue with its source; Shopify test orders are ignored there on purpose, so pay for real and refund.

Note that this line uses meta as the source. Revenue reads those visits as paid social from the medium, but in GA4's default channel group they meet only the Paid Other definition, so if you also read GA4 channels, add the custom channel group described in the first mistake.

Nothing goes live without your approval, and budgets stay under your control. AdRiseLab also runs an account audit with recommendations on your connected ad account. With sales credited per ad, the ROAS calculator and CPA calculator turn sales and spend into a return and a cost per sale. Setup is in the Revenue guide and Review and launch a campaign. AdRiseLab is Meta-only, so it is the wrong pick if most of your budget goes to Google or TikTok. Plans start at $39 a month; see pricing.

Method and limits

Meta's rules come from three Business Help Center pages and two developer documents; Google's from four Analytics Help pages, the source category list linked from the default channel group page, and one Google Ads Help page. All were read on November 25, 2026. Meta gives no key names for its automatic parameters, so none are given here. The GA4 results cover the default channel group and tags you set yourself. The pages read do not state the order in which the default group checks its channels, so this post says which definitions a tag meets. Placements outside Meta's eleven-row table were not tested, and the campaign ID in the renaming example is made up.

Sources

Meta: Add URL parameters to your Meta ads in Meta Ads Manager, Meta: Specifications for dynamic URL parameters, Meta: Preview an ad during ad creation, Meta for Developers: Use URL tags for tracking, Meta for Developers: ClickID and the fbp and fbc parameters, Google Analytics: Collect campaign data with custom URLs, Google Analytics: Default channel group and its source categories list, Google Analytics: Custom channel groups, Google Analytics: Realtime report and Google Ads: ValueTrack parameters, all read on November 25, 2026.

Related reading

Meta Pixel vs Conversions API, what Meta's Event Match Quality score means, engage-through attribution and why Meta conversions dropped and why Meta ads ROAS drops.

See Meta's numbers next to the sales that happened

Revenue reads the sales Stripe or Shopify processed and shows them beside the conversions Meta reports, as two separate measurements. From $39/mo.

Frequently Asked Questions

What are UTM parameters on Facebook ads?
Tags added to the end of an ad's link, such as utm_source=facebook and utm_campaign={{campaign.id}}, that tell Google Analytics, your store or an attribution tool which source, campaign and ad sent a visit. In Ads Manager you add them in the URL parameters field under Tracking, and Meta appends them to the website URL on every click.
What is the best UTM template for Facebook ads?
For matching visits and sales to spend: utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.id}}&utm_content={{ad.id}}. For reports people read by name: utm_source=facebook&utm_medium=paid_social&utm_id={{campaign.id}}&utm_campaign={{campaign.name}}&utm_content={{ad.name}}. Whichever you pick, use the same line on every ad, in lowercase.
Where do I add URL parameters in Facebook Ads Manager?
At the ad level. Go through the ad creation steps until you reach Tracking, then paste the parameters into the URL parameters field, or click Build a URL parameter and click Apply when you are done. Put them there rather than in the website URL: if the same key appears in both, Meta keeps the value from the URL parameters field.
Does Facebook add UTM parameters automatically?
It may. Meta's help pages say that since January 1, 2024, ad traffic may get an automatic campaign source of Facebook or Instagram, a medium of paid, and the ad, ad set, campaign and campaign tracking group IDs. Shopify merchants may get a source of Facebook, a medium of paid, and the ad and campaign IDs. The pages do not give the key names, so check a click from an ad without your own parameters. Meta also adds its own click ID, fbclid, which does not affect the parameters you set.
Should I use {{campaign.name}} or {{campaign.id}} in UTMs?
Use {{campaign.id}} to join visits and sales to spend, because the ID never changes. Meta stores name values when the campaign is first published, and the parameter keeps the original name even after you rename the campaign. Use names for reports people read, ideally with the campaign ID in utm_id next to them.
Why does my Facebook traffic show up as Paid Other in GA4?
Check the source first. GA4's Paid Social definition needs a source on Google's list of social sites and a paid medium. Values such as meta, or the msg, an and th values from {{site_source_name}}, are not on that list, so with a paid medium they meet only the Paid Other definition. Change the source to facebook, fb, ig or instagram, or create a custom channel group that matches your value.
Can I change UTM parameters after an ad is published?
Yes, but Meta warns that changing URL parameters after publishing may send the ad set back into the learning phase. Name-based values cannot be changed at all during the life of the campaign, ad set or ad. To change one, Meta says you have to publish a new campaign, ad set or ad.
What does {{site_source_name}} return?
The app where the ad was shown: fb for Facebook, ig for Instagram, msg for Messenger, an for Audience Network and th for Threads, according to Meta's specifications read on November 25, 2026. In GA4, fb and ig are on Google's list of social sources, while msg, an and th are not.
CM
Caner Moral

Founder & CEO, AdRiseLab

Performance marketer turned product builder focused on Meta advertising, creative workflows, and measurement. Founded AdRiseLab to reduce the research-to-publish bottleneck in Meta advertising.

Share this article

More from AdRiseLab