Meta Dynamic URL Parameters: {{campaign.name}}, {{adset.name}}, and {{ad.name}} Guide

Master Meta dynamic URL parameters. Learn syntax rules, how tokens expand at click time, and how to prevent raw token strings from appearing in GA4.

Platform rules verified for Google Analytics 4 (September 2026)
Syntax illustration of Meta dynamic macro tokens expanding into actual campaign names upon click
Table of Contents
  1. How Meta Dynamic Parameters Work Under the Hood
  2. Syntax Rules: Double Braces and Lowercase Dots
  3. Why Raw Tokens ({{campaign.name}}) Show in GA4
  4. Copy-and-Paste Production Parameter Strings

Meta dynamic URL parameters allow you to automatically inject campaign, ad set, and ad names into tracking links without manually editing every single creative. Understanding how these macros evaluate and avoiding syntax typos is critical for clean attribution.

How Meta Dynamic Parameters Work Under the Hood

When you insert a dynamic token such as {{campaign.name}} into the URL Parameters field, Meta stores the token template. When an ad impression is delivered and clicked, Meta's edge servers replace the placeholder with the actual string from Ads Manager before redirecting the browser to your landing page.

Syntax Rules: Double Braces and Lowercase Dots

Meta enforces strict syntax rules for dynamic parameters:

  • Must use double curly braces: {{...}}. Single braces (like Google ValueTrack) will fail and be passed as literal text.
  • Must use lowercase dot notation: {{campaign.name}}, NOT {{campaign_name}} or {{CAMPAIGN.NAME}}.
  • No spaces inside the braces: {{ ad.name }} is invalid.

Why Raw Tokens ({{campaign.name}}) Show in GA4

If you see literal strings like {{campaign.name}} or %7B%7Bcampaign.name%7D%7D in your GA4 campaign reports, one of three things happened:

  1. Preview Links Clicked: Someone clicked an ad preview inside Ads Manager or Facebook feed preview. Meta does not expand dynamic parameters in preview modes!
  2. Syntax Typos: Using underscores or incorrect capitalization (e.g. {{Campaign.Name}}).
  3. Boosted Posts / Page Posts: Boosting an existing organic post from your Facebook page using the simplified boost interface rather than full Ads Manager. The simplified interface does not support dynamic URL parameter expansion.

Copy-and-Paste Production Parameter Strings

utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.name}}&utm_content={{ad.name}}&utm_term={{adset.name}}&utm_id={{campaign.id}}

Sources & Authoritative References