Your parameters
Start from
Output
Output
Paste into Tracking → URL parameters on each ad. No leading ? needed.
What a click looks like
Sample values. The real ones are filled in by the ad platform at click time.
Where to paste it
- In Ads Manager, open the ad (not the campaign or ad set).
- Scroll to Tracking → URL parameters and paste the output. Don't add a
?; Meta joins it to the website URL. - Selecting several ads and editing them together applies it to all of them.
- Publish, then preview the ad and click it to check the parameters reach the landing page.
Meta dynamic URL parameters
Meta replaces placeholders such as {{campaign.name}}, {{adset.name}} and
{{ad.name}} with the real values when someone clicks. One parameter string can then be reused on
every ad, and each click still says which campaign, ad set and ad it came from.
Names are copied as they are in Ads Manager. Spring Sale 2026 arrives as
Spring Sale 2026, and GA4 treats it as a different campaign from spring_sale_2026.
Either name campaigns lowercase with underscores, or use the .id placeholders and look the names
up later.
{{site_source_name}} tells you where the ad was shown: fb, ig,
msg (Messenger) or an (Audience Network). It's handy if you want Facebook and
Instagram as separate sources, but check how the less common values land in GA4 with the
GA4 channel checker.
Frequently asked questions
Where do I add URL parameters in Meta Ads Manager?
At ad level: open the ad, scroll to Tracking and paste the string into URL parameters. Campaigns and ad sets don't have this field.
Should utm_source be facebook or {{site_source_name}}?
Use facebook if you want all Meta ads in one source. Use {{site_source_name}} to split Facebook (fb), Instagram (ig), Messenger (msg) and Audience Network (an).
Which utm_medium should I use for Meta ads?
paid_social or cpc. GA4 sorts both into Paid Social when the source is a social network like facebook, fb or ig. Avoid social, which GA4 counts as Organic Social.
Why do my campaign names have capitals and spaces in GA4?
{{campaign.name}} copies the name exactly from Ads Manager. Rename campaigns to lowercase with underscores, or use {{campaign.id}} instead.