Meta URL parameters: macros and common errors
Updated by the UTM Builder team at Limner.
In Ads Manager, the UTM goes in the URL parameters field, in the ad’s Tracking section. Meta appends that field to the end of the website URL and replaces the macros with the real values at click time.
The official macros
Meta’s specifications page lists these macros (dynamic parameters):
{{campaign.id}},{{adset.id}}and{{ad.id}}, the IDs.{{campaign.name}},{{adset.name}}and{{ad.name}}, the names.{{placement}}, the placement, and{{site_source_name}}, the source site.{{media_type}}, for Advantage+ catalog ads only.
A line that works as a starting point:
utm_source={{site_source_name}}&utm_medium=paid-social&utm_campaign={{campaign.name}}&utm_content={{ad.name}}&utm_id={{campaign.id}}
Names freeze at publish time
Meta warns that name-based parameters use the campaign, ad set or ad name as it was when the item was first published. You can rename it later, but the URL keeps the original name for the whole life of that item. If the name is going to change, use the ID macro or lock in the name before publishing.
Common errors
- The same parameter in two places. According to Meta, the URL parameters field overrides duplicate parameters in the website URL. A
utm_sourcewritten in the URL disappears if the field also has one. - Leaving the field empty and assuming nothing happens. Meta states that since January 1, 2024, it may add parameters automatically, such as Facebook or Instagram as the source and paid as the medium. Those values don’t follow your naming convention.
{{placement}}inutm_source. Each placement becomes a different source in GA4. A source that changes by placement fragments the report and gets in the way of cost data import, which needs stable values.- Spaces and accents in names. Meta shows that spaces become
%20in the URL. Campaign names in lowercase, with no spaces and no accents, avoid duplicate rows and broken links on picky checkouts. - Editing a live ad. You can change the parameters after publishing, but Meta warns that the ad set may go back into the learning phase.
Medium and channel in GA4
To land in Paid Social, the medium has to be recognized as paid, for example by starting with paid, and the source has to be on Google’s list of social sites. If the source isn’t recognized, the session goes to Paid Other. Test with a real click and check the report before you scale the budget.