UTM convention

How to add UTM parameters to Meta ads

The template to paste into your Facebook and Instagram ads, where it goes in Meta Ads Manager, and what every parameter records.

Paste the template into each ad’s URL parameters. Meta fills in the campaign, ad set and ad for every click, so Maven can tie each visit to the ad behind it.

The template#

Paste this into the URL parameters of every Meta ad. The parts in double braces are Meta’s dynamic parameters: Meta replaces them with the real campaign, ad set and ad on every click.

text
utm_source=meta&utm_medium=paid_social&utm_campaign={{campaign.name}}&utm_content={{adset.name}}&utm_term={{ad.name}}&utm_mc_id=cm-{{campaign.id}}-ag-{{adset.id}}-ad-{{ad.id}}-cr-{{creative.id}}-pl-{{placement}}-ss-{{site_source_name}}

Where to paste it in Meta Ads Manager#

  1. In Meta Ads Manager, go to the Ads tab and select the ad you want to update. To update several ads at once, select them all.
  2. Choose Edit, then scroll to the Tracking section.
  3. Find URL parameters and paste the template into the field, replacing anything already there.
  4. Select Publish.

Add the template when you create an ad where you can. Changing the URL of an ad that is already running can send it back into Meta’s learning phase.

Meta adds its own click ID (fbclid) to every click. Leave it there alongside the template.

What each parameter records#

ParameterValue in the templateWhat it records
utm_sourcemetaThe platform the click came from. Always meta, for Facebook, Instagram, Messenger and Audience Network.
utm_mediumpaid_socialThe kind of ad: a paid ad on a social platform.
utm_campaign{{campaign.name}}The campaign name, as it reads in Ads Manager, filled in by Meta on each click.
utm_content{{adset.name}}The ad set name, filled in by Meta on each click.
utm_term{{ad.name}}The ad name, filled in by Meta on each click.
utm_mc_idcm-{{campaign.id}}-ag-{{adset.id}}-ad-{{ad.id}}-cr-{{creative.id}}-pl-{{placement}}-ss-{{site_source_name}}Maven’s tracking ID: the campaign, ad set, ad and creative IDs, plus the placement and site, in one value, so a visit ties to the exact ad even after you rename it.

The parts of utm_mc_id#

utm_mc_id carries the IDs Maven needs to tie a visit to the exact Meta Ads ad, in one value, so it survives link shorteners and redirects. Each part starts with a short prefix.

PrefixMeta Ads dynamic parameterMeaning
cm-{{campaign.id}}Campaign ID
ag-{{adset.id}}Ad set ID
ad-{{ad.id}}Ad ID
cr-{{creative.id}}Creative ID
pl-{{placement}}Placement, for example Facebook_Mobile_Feed
ss-{{site_source_name}}Site: fb (Facebook), ig (Instagram), msg (Messenger) or an (Audience Network)

Check it’s working#

Click through from the ad to your site. The address should carry utm_source=meta and a utm_mc_id that starts cm- followed by the real IDs, not the parameter names in double braces. Maven reads your ads each morning, and Attribution settings shows Meta Ads as following the convention once Meta reports the new parameters.

If your ads use a different convention#

Keep it. In Maven, open Attribution settings and add an exception for the parameter that differs, for example “On Meta Ads, utm_medium is paid”. Maven then reads your ads the way you tag them. When Maven sees ads that don’t match the convention, it asks you there whether to keep them that way.

utm_mc_id is the one parameter every ad needs. Without it, Maven can’t tie a visit to the exact ad.

For the whole convention and the other platforms, see Maven’s UTM convention.