Raydar free tools · UTM builder

Facebook ads UTM parameters, with Meta's dynamic macros

For Meta ads, put utm_source={{site_source_name}}, utm_medium=paid_social and utm_campaign={{campaign.name}} in the ad's URL parameters field. Facebook clicks resolve to fb and Instagram clicks to ig. Both are on GA4's social source list, so they land in Paid Social with the platform still visible.

The interactive UTM builder loads with this page, pre-filled for Facebook and Instagram ads, and runs entirely in your browser.

The preset

utm_source={{site_source_name}}&utm_medium=paid_social&utm_campaign={{campaign.name}}

fb and ig are both on Google's social source list and paid_social matches GA4's paid medium pattern, so Facebook and Instagram feed clicks meet both halves of the Paid Social rule.

Where to put it

  1. In Ads Manager, open the ad itself. Meta only takes URL parameters at ad level; there is no account or campaign template.
  2. Under Tracking, paste the parameter string into the URL parameters field.
  3. Keep UTMs out of the Website URL field. If a key appears in both, the URL parameters value wins.
  4. Give every key a value. An empty one, like utm_content= with nothing after it, is a mistake Meta's own help page warns against.
  5. Set it before you publish. Changing URL parameters on a live ad set can send it back into the learning phase.

Macros filled in at click time

MacroResolves to
{{ad.id}}Ad ID
{{ad.name}}Ad name, as first published
{{adset.id}}Ad set ID
{{adset.name}}Ad set name, as first published
{{campaign.id}}Campaign ID
{{campaign.name}}Campaign name, as first published
{{placement}}Placement of the impression
{{site_source_name}}fb (Facebook), ig (Instagram), msg (Messenger), an (Audience Network), th (Threads)
{{media_type}}Media type; Advantage+ catalog ads only

{{site_source_name}} can resolve to five values: fb, ig, msg, an and th, for Facebook, Instagram, Messenger, Audience Network and Threads. Google's published list of social sources, the list GA4's Paid Social rule checks, includes fb and ig. It has no msg, an or th. Clicks from those three placements carry a paid medium and a source GA4 doesn't recognise, so they fall to Paid Other, which only needs the paid medium. If your spend sits in Facebook and Instagram feeds, the preset is all you need. If you run wide Advantage+ placements, expect a Paid Other line and read it as Meta traffic, or build a custom channel group that claims those three values.

Names freeze on the day you publish. {{campaign.name}}, {{adset.name}} and {{ad.name}} resolve to the name each had when it was first published. Rename a campaign mid-flight and its UTMs keep the old name for the rest of its life; only a new campaign picks up the new one. Settle names before launch, following one naming convention, or tag with the ID macros and keep a sheet that maps IDs to names.

Meta adds parameters of its own. Since 1 January 2024, Meta may add Campaign Source (Facebook or Instagram), Campaign Medium (paid), Ad ID, Campaign ID, Ad set ID and Campaign Tracking Group ID to ad traffic, separately from anything you type. Shopify merchants get a shorter set. If a medium you never wrote turns up in a report, check this list before you blame your own template.

Some formats take no macros. Dynamic parameters only work for certain objective and destination combinations, and not at all on collection ads in Instagram placements. {{media_type}} only fills on Advantage+ catalog ads. For anything outside those combinations, type static values instead.

Running many ads? Meta has no campaign-level template, so the same string has to go into every ad. Build it once here, or tag a full launch with the bulk UTM builder, and paste the same spelling every time.

Questions

How do I add UTM parameters to Facebook ads?

Open the ad in Ads Manager, find the Tracking section and paste your parameter string into the URL parameters field. Meta only accepts URL parameters at ad level, so each ad needs its own entry; there is no account or campaign template.

How do I set dynamic UTM parameters in Meta ads?

Use Meta's macros as values in the URL parameters field, for example utm_source={{site_source_name}}&utm_medium=paid_social&utm_campaign={{campaign.name}}. Meta fills them in at click time. They're only available for certain objective and destination combinations, and not on collection ads in Instagram placements.

Why do my UTMs still show the old campaign name after I renamed it?

Name macros such as {{campaign.name}} lock to the name used when the campaign was first published and can't change for its lifetime. Only a newly created campaign, ad set or ad picks up a new name.

Does Meta add its own UTM parameters?

It can. Since 1 January 2024 Meta may add Campaign Source, Campaign Medium (paid), Ad ID, Campaign ID, Ad set ID and Campaign Tracking Group ID to ad traffic on its own, separately from anything you type.

Back to the UTM builder for every platform, or another one: TikTok ads · Google Ads

Give your bio link a brain.

Build your page, watch who converts, free to start.

Get started free

No card required.