Guide

Facebook URL parameters: list, template and pitfalls

Facebook URL parameters, explained: every dynamic value Meta documents, where to add it in Ads Manager, a UTM template, and why {{ad.id}} beats {{ad.name}}.

By Simone Manto, founder of DropCPL · Published

Facebook URL parameters are the key=value pairs added to an ad’s destination URL, set at ad level in the URL parameters field under Tracking in Ads Manager. The dynamic ones, like {{ad.id}} or {{placement}}, are filled in by Meta from the ad’s setup and delivery, so each visit arrives labelled with the ad, ad set and campaign that sent it.

Put them on every ad, before it goes live. They cost nothing, and without them your landing page has no way of telling one ad from another.

The full list of Facebook dynamic URL parameters

Meta’s specification for dynamic URL parameters lists nine values as of November 2026. Eight work on any eligible ad; {{media_type}} is for Advantage+ catalog ads only.

ParameterWhat it returnsExample valueUse it for
{{campaign.id}}the campaign ID120210000000000011joining leads to campaign spend
{{adset.id}}the ad set ID120210000000000022CPL by audience
{{ad.id}}the ad ID120210000000000033CPL by ad: the join key
{{campaign.name}}the campaign name at first publishProspecting%202026readable labels
{{adset.name}}the ad set name at first publishItaly%20Broadreadable labels
{{ad.name}}the ad name at first publishHolidayreadable labels
{{placement}}where the ad was showninstagram_storiesplacement splits, with care
{{site_source_name}}the app the click came fromigutm_source
{{media_type}}Advantage+ catalog ads onlynot listed by Metacatalog ads

The IDs in the table are made up. Real ones are long numeric strings assigned by Meta. Two of the name examples come from Meta’s own specification, encoding included: a campaign called “Prospecting 2026” arrives as Prospecting%202026.

What {{placement}} and {{site_source_name}} return

{{site_source_name}} returns a short code: fb for Facebook, ig for Instagram, msg for Messenger, an for Audience Network and th for Threads.

{{placement}} returns one of the values Meta lists for supported placements:

Placement{{placement}} value
Facebook Feedfacebook_feed
Facebook in-stream reelsfacebook_instream
Facebook Marketplacefacebook_marketplace
Facebook Right Columnfacebook_right_column
Instagram Feedinstagram_feed
Instagram Storiesinstagram_stories
Messenger Inboxmessenger_inbox
Messenger Sponsored Messagesmessenger_sponsored_messages
Threadsthreads_stream
Audience Network native, banner and interstitialaudience_network_classic
Audience Network Rewarded Videoaudience_network_rewarded_video

Meta adds that, starting in March 2026, the Facebook Feed placement includes the Facebook Friends tab. That’s the whole list. Instagram Reels and Facebook Stories aren’t in it, so if most of your spend runs there, don’t build a placement report on this parameter alone. Facebook ads placements for lead generation shows how to judge placements on qualified leads, and why the platform is the steadier level to read.

Where to add Facebook URL parameters in Ads Manager

Meta’s help article on adding URL parameters gives these steps:

  1. Create the ad, or open a draft, and work through the setup until you reach Tracking at ad level.
  2. Under Tracking, type the string into the URL parameters field, or click Build a URL parameter to compose it there.
  3. Join each key and value with = and separate the pairs with &. Don’t leave a value empty: Meta asks you to fill it in or remove the key.
  4. Click Apply.

The rules that decide what the final URL looks like:

  • The field is appended to the Website URL. If the same key appears in both, the field wins: utm_source=1 in the Website URL and utm_source=2 in the field gives you utm_source=2.
  • Ads Manager overrides parameters set elsewhere, such as Instagram’s default URL parameters.
  • Editing after launch has a cost. Meta’s specification warns that changing URL parameters on a published campaign may send the ad set back into the learning phase.

My advice: keep the Website URL clean and put all tracking in the field. One place to check, and the override rule can’t surprise you.

Dynamic parameters are available for the Traffic, Engagement, Leads and Sales objectives, and for some Awareness goals. For Leads, Meta lists the Website, Instant forms and Messenger conversion locations. App promotion is the odd one out: there’s no URL parameters field, so Meta tells you to append them to the deferred deep link.

A copy-paste UTM template for Facebook ads

This is the template I’d start from. It puts the IDs in the fields you’ll join on:

utm_source={{site_source_name}}&utm_medium=paid&utm_campaign={{campaign.id}}&utm_term={{adset.id}}&utm_content={{ad.id}}&placement={{placement}}
  • utm_source={{site_source_name}} splits Facebook, Instagram, Messenger, Audience Network and Threads traffic.
  • utm_medium=paid is a fixed value, the same medium Meta uses when it adds parameters on its own (more on that below).
  • utm_campaign, utm_term and utm_content carry the campaign, ad set and ad IDs. With the ad ID in utm_content, a form tool that already captures UTMs picks up the ad too.
  • placement is a custom key. Analytics tools ignore it; your CRM can store it.

If your team reads Google Analytics reports and wants names, add them as extra keys. Don’t swap them into the ID slots:

&campaign_name={{campaign.name}}&adset_name={{adset.name}}&ad_name={{ad.name}}

Paste the result into the URL parameters field of every ad, or build the URL with the template above and check the output before publishing. A click on an Instagram Stories ad then reaches your landing page like this (example values):

https://example.com/offer?utm_source=ig&utm_medium=paid&utm_campaign=120210000000000011&utm_term=120210000000000022&utm_content=120210000000000033&placement=instagram_stories&fbclid=IwAR...

Why IDs beat names for attribution

Names are for people, IDs are for joins. Meta’s spec makes the argument for you: name parameters are set to the name the campaign, ad set or ad had when the ad was first published. Rename “Holiday” to “Holiday v2” in Ads Manager and the URL keeps sending Holiday, while your spend export now says “Holiday v2”. The join between leads and spend, the one CPL by creative depends on, breaks without a warning.

{{ad.name}}{{ad.id}}
After a rename in Ads Managerstill sends the old nameunchanged, still matches
Unique per adno, two ads can share a nameyes
Needs URL decodingyes, spaces arrive as %20no, digits only
Matches the spend exportonly if nobody renamed anythingalways
Readable by a humanyesno

Names win one row out of five, which is why the template keeps them as optional extras. Store the IDs as text, never as numbers: an 18-digit value is larger than a JavaScript number can hold exactly, and the ad_id glossary entry explains how that silently breaks the join.

How fbclid gets appended

You never add fbclid yourself. Meta’s developer documentation on ClickID describes it as a Meta-generated parameter passed with the URL of your website when someone clicks an ad on Facebook or Instagram, and says the automatic attachment doesn’t affect the tracking parameters you’ve set. Your template and fbclid share the same URL without conflict.

What it’s for: building the fbc value you send with Conversions API events, of the form version.subdomainIndex.creationTime.fbclid. The guide to the fbc and fbp cookies covers the details. Meta also notes the value is case sensitive, so store it exactly as it arrived.

What it can’t do: tell you which ad was clicked. An fbclid doesn’t identify the ad without a lookup on Meta’s side, so it doesn’t replace {{ad.id}} in your own data.

Does Facebook add UTM parameters automatically?

Sometimes, and you shouldn’t build on it. The same help article on adding URL parameters says that as of January 1, 2024 these may be added to your ad traffic automatically: campaign source (Facebook or Instagram), campaign medium (paid), ad ID, campaign ID, ad set ID and a campaign tracking group ID. The operative word is “may”, and the article doesn’t name the keys. Set your own template, so the keys your CRM expects are always the same ones.

A URL parameter only helps if it survives the trip from the click to the form. DropCPL logs the ad_id when the click lands on the tracking domain that also serves your landing page, and stores it in a first-party cookie set server-side, with no redirect hop. Start free →

Where Facebook URL parameters break

Redirects that drop the query string

Any hop between the ad and the landing page can rebuild the URL without its query string: a link shortener, an http-to-https rule, a CMS redirect, a geo redirect. Check the URL your landing page actually receives, after a real click on a live ad, not the one you typed into Ads Manager.

Forms that don’t carry the parameters

The URL can be perfect and the lead can still arrive without an ad. The form never copied the values into hidden fields, a multi-step form moved to step two on a URL without them, or a thank-you redirect fired before they were saved. The fix, with a snippet, is in how to track the Facebook ad ID in your CRM.

Return visits

Meta’s help article is explicit about this one: a URL parameter applies to the visit that came from the ad. If the person leaves and comes back to your landing page later on their own, the parameter is gone. Only an identifier stored on that first visit links the return to the click, and the tracking identifiers entry explains why it should be a first-party cookie set server-side.

Names with spaces

Spaces arrive as %20, as Meta’s own example shows. If one tool decodes the value and another doesn’t, “Prospecting 2026” and “Prospecting%202026” turn into two campaigns in your reports. IDs have nothing to decode.

Formats where dynamic parameters don’t work

From Meta’s two help articles:

  • collection ads on Instagram placements don’t support dynamic URL parameters;
  • {{media_type}} only populates on Advantage+ catalog ads;
  • app promotion campaigns have no URL parameters field, so the parameters go at the end of the deferred deep link;
  • on ads that promote an existing post, the parameters apply to clicks on the ad, not to people who click the link after seeing the post organically.

Checklist before you publish

  • The template is in the URL parameters field, not in the Website URL
  • {{campaign.id}}, {{adset.id}} and {{ad.id}} land in fields your CRM stores as text
  • No key has an empty value
  • One live click tested end to end: URL, hidden fields, CRM record
  • No redirect between the ad and the landing page drops the query string

FAQ

How do I add URL parameters to Facebook ads?+

Open the ad in Ads Manager, scroll to the Tracking section at ad level and type them into the URL parameters field, or click Build a URL parameter, then Apply. Meta appends them to the Website URL, and if the same key appears in both places, the URL parameters field wins.

What are dynamic URL parameters in Facebook ads?+

Placeholders in double curly braces, such as {{ad.id}} or {{campaign.name}}, that Meta fills in with the real values of the ad that was clicked. Meta documents nine of them: the campaign, ad set and ad IDs, the same three names, placement, site source name, and media type for Advantage+ catalog ads.

Does Facebook automatically add UTM parameters?+

Partly. Meta says that since January 1, 2024 some parameters may be added to ad traffic automatically, such as source, medium (paid) and the ad, ad set and campaign IDs. "May" is the operative word and the key names are not documented, so set your own template if your CRM expects consistent fields. Meta always appends fbclid on its own.

Why does {{campaign.name}} show an old campaign name?+

Meta sets name-based parameters to the name the campaign, ad set or ad had when the ad was first published. Renaming it later changes Ads Manager but not the value in the URL. Use {{campaign.id}} when you need a value that matches your spend export.

Can I change URL parameters after the ad is live?+

Yes, but Meta warns that changing them on a published campaign may send the ad set back into the learning phase. Settle the template before you publish and use the same one on every ad, so the values stay comparable.

Ready to find out what
converts, for real?

Free to start.

Start free →