Guide
Meta ads URL parameters: a dynamic UTM template that works
In Meta Ads Manager, UTM tags go in the ad's URL parameters field, under Tracking. Use Meta's dynamic parameters, like {{ad.name}}, and Meta fills in the real campaign, ad set and ad names on every click, so one template works on every ad.
A URL parameters template you can copy
utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.name}}&utm_term={{adset.name}}&utm_content={{ad.name}}&utm_id={{campaign.id}}Paste it as is into every ad. facebook with paid_social lands in GA4's Paid Social channel, for Instagram clicks too. Keep campaign, ad set and ad names lowercase with no spaces, because the names go into your reports exactly as typed.
Where to add URL parameters in Ads Manager
- Create a campaign in Ads Manager, or open a draft.
- Work through the ad creation steps until you reach Tracking on the ad.
- Type or paste the tags into the URL parameters field, or click Build a URL parameter to fill them in one by one.
- Click Apply. The parameters show in the field.
Meta adds these to the website URL when someone clicks. If the same parameter is in both, the one in the URL parameters field wins: with utm_source=1 in the website URL and utm_source=2 in the field, only utm_source=2 reaches your site. Meta also asks you never to leave a value empty, like background=.
Every Meta dynamic parameter
| Parameter | Fills in |
|---|---|
{{campaign.name}} | Campaign name |
{{campaign.id}} | Campaign ID |
{{adset.name}} | Ad set name |
{{adset.id}} | Ad set ID |
{{ad.name}} | Ad name |
{{ad.id}} | Ad ID |
{{placement}} | Where the ad showed, like facebook_feed, instagram_stories or threads_stream |
{{site_source_name}} | fb Facebook, ig Instagram, msg Messenger, an Audience Network, th Threads |
{{media_type}} | Media type, for Advantage+ catalog ads only |
Each one needs two curly braces on each side and the exact spelling. {ad.name} or {{ad_name}} stays as plain text in your link, and every ad reports that text instead of its own name.
Three things Meta's help pages say that catch people out
- Names are frozen at first publish.
{{campaign.name}},{{adset.name}}and{{ad.name}}fill in the name used when the ad was first published. Rename it later and the link keeps the old name. Agree a naming convention before launch. - Editing parameters on a live ad can cost you. Meta says changing URL parameters after you publish may send the ad set back into the learning phase.
- Meta may tag your traffic for you. Since 1 January 2024, Meta says it may add a source of Facebook or Instagram, a medium of
paidand the campaign, ad set and ad IDs. Parameters you set in Ads Manager override them, so set your own to keep one naming rule.
utm_source: facebook or {{site_source_name}}?
Using utm_source={{site_source_name}} splits Facebook and Instagram clicks into separate sources. The catch is GA4's channel rules: fb and ig are on its list of social sites, but msg, an and th are not (we checked Google's list on 5 Nov 2026), so Messenger, Audience Network and Threads clicks land in Paid Other instead of Paid Social. If you want the split, keep utm_source=facebook and put {{site_source_name}} or {{placement}} in a parameter of your own, like placement={{placement}}.
Dynamic parameters work for the Awareness, Traffic, Engagement, Leads, Sales and App promotion objectives, with limits on some conversion locations. For app promotion, add them to the end of the deferred deep link. Meta says they don't work for collection ads on Instagram placements.
Dynamic parameters on other platforms
Each platform has its own spelling. One platform's parameter in another's link stays as plain text.
| Platform | Campaign | Ad set / ad group | Ad |
|---|---|---|---|
| Meta | {{campaign.name}} | {{adset.name}} | {{ad.name}} |
| TikTok | __CAMPAIGN_NAME__ | __AID_NAME__ | __CID_NAME__ |
| Microsoft Ads | {Campaign} | {AdGroup} | {AdId} (ID only) |
{{CAMPAIGN_NAME}} | {{AD_SET_NAME}} | {{AD_NAME}} | |
| Google Ads | {campaignid} (ID only) | {adgroupid} (ID only) | {creative} (ID only) |
| DV360 | ${INSERTION_ORDER_ID} | ${CAMPAIGN_ID} (the line item) | ${CREATIVE_ID} |
| Campaign Manager 360 | %ebuy! | %epid! (placement) | %ecid! (creative) |
Google Ads has no parameter for the campaign name, so type it in: see the Google Ads tracking template guide. LinkedIn's are set once on the ad set rather than in each link: see LinkedIn ads UTM parameters. TikTok's upgraded Smart+ campaigns use __ADID_V2_NAME__ for the ad. Campaign Manager 360's must be lowercase.
Build and check them without typing
The free campaign naming and UTM builder adds the right dynamic parameters for each platform. The UTM link checker flags single braces, misspelt parameters and a parameter from the wrong platform. Both run in your browser, so nothing you type is sent to us.
Building the campaign in Ads Manager? The free Meta Ads Pre-Launch Checker Chrome extension checks your Meta build against your setup sheet before you publish, URL parameters included.