NEW: Finally See Which AI Engines Drive Your Leads & RevenueLearn more
Free Tool · Meta dynamic macros

Facebook UTM Builder with Meta dynamic macros

Set tracking once at the campaign level, every ad auto-fills. {{campaign.name}}, {{ad.id}}, {{site_source_name}}, all 8 Meta macros — baked in, validated, and copy-paste ready.

Set once, tracks every ad. Use the recommended Meta macro template — values auto-fill at click time, no per-ad work.

(ad's link URL)
Add a destination URL.
utm_source
utm_medium
utm_campaign
utm_term
utm_content

Using 7 dynamic macros — values auto-fill per click.

Add a destination URL above to generate your tagged link.

Preview at click time (example values)

Why hardcoded Facebook UTMs fall apart

Most people build Facebook UTMs the same way they build email UTMs: they type the campaign name, the ad set name, the ad name into a generic builder and paste the result into the ad URL. It works for one ad. Then a teammate renames the campaign, or duplicates an ad set, or forgets to update the URL when they change the creative — and your reports start lying.

Meta gave us a fix: dynamic URL parameters. Drop tokens like {{campaign.name}} and {{ad.id}} into the URL once, paste it into the campaign-level URL parameters field, and every single ad inside that campaign gets correctly tagged forever — even ones you create next year. Rename a campaign? Reports update automatically. Duplicate an ad set? Tracking follows.

All 8 Meta dynamic URL macros

  • {{campaign.name}}campaign name
  • {{campaign.id}}campaign numeric ID
  • {{adset.name}}ad set name
  • {{adset.id}}ad set numeric ID
  • {{ad.name}}ad name
  • {{ad.id}}ad numeric ID
  • {{site_source_name}}fb · ig · msg · an
  • {{placement}}e.g. Facebook_Mobile_Feed

Tagging Google Ads or other platforms?

Different platforms, different macros. Use the right builder.

Frequently asked questions

What are Meta dynamic URL parameters?

Meta dynamic URL parameters are placeholder tokens like {{campaign.name}}, {{adset.name}}, {{ad.id}}, {{site_source_name}}, and {{placement}} that Meta replaces with real values at the moment a user clicks your ad. Drop them into your URL once at the campaign or ad set level and every ad inside automatically gets correctly-tagged — no per-ad copy-paste, no human errors, and your reports stay accurate even when you rename campaigns later.

What are all 8 Meta URL macros?

Meta supports exactly eight dynamic URL parameters: {{campaign.id}}, {{adset.id}}, {{ad.id}}, {{campaign.name}}, {{adset.name}}, {{ad.name}}, {{site_source_name}}, and {{placement}}. The IDs are numeric and never change. The names match what you typed in Ads Manager. site_source_name returns one of fb, ig, msg, or an (Facebook, Instagram, Messenger, Audience Network). placement returns the surface like 'Facebook_Mobile_Feed' or 'Instagram_Stories'.

Should I add UTMs to each ad's URL or use Ads Manager URL Parameters?

Use the URL Parameters field at the campaign or ad set level. In Ads Manager, expand Tracking → URL parameters when creating or editing a campaign / ad set / ad. Paste utm_source={{site_source_name}}&utm_medium=paid-social&utm_campaign={{campaign.name}}&utm_term={{adset.name}}&utm_content={{ad.name}}-{{ad.id}} once. Meta automatically appends those params to whatever URL each ad uses — no need to edit individual ad URLs. Set it once, and every new ad inherits the tracking.

What's the recommended Facebook UTM setup?

The community-standard preset uses macros for every dynamic field: utm_source={{site_source_name}}, utm_medium=paid-social, utm_campaign={{campaign.name}}, utm_term={{adset.name}}, utm_content={{ad.name}}-{{ad.id}}. This gives you platform separation in source (fb/ig/msg/an), Meta-vs-organic separation in medium, and full hierarchy in campaign/term/content. Click 'Apply template' in the tool to set it instantly.

Should utm_medium be 'cpc' or 'paid-social' for Facebook?

Use paid-social. GA4's Default Channel Group routes 'cpc' to the Paid Search bucket and 'paid-social' to Paid Social — keeping them separate is what you want. If you use cpc for Facebook, your Meta clicks will get lumped in with Google paid search in your reports. Use cpc only for paid search platforms (Google Ads, Bing).

Why do I lose Facebook conversions even with perfect UTMs?

UTMs only solve the attribution problem on the first click. The bigger Meta-specific issue is iOS 14+ ATT — when a user opts out, the Meta pixel can't fire client-side, and the conversion never makes it back to Meta's algorithm. The result: Meta optimizes on incomplete signal, lookalikes get worse, and your CPMs climb. The fix is server-side tracking via Meta's Conversions API (CAPI), which sends events from your server directly to Meta — bypassing the browser entirely. LeadJourney handles CAPI, click-ID storage (fbclid), and CRM-side conversion uploads in one connected setup.

Track every test
With Pixel-Perfect Accuracy

every lead with pixel-perfect accuracy LeadJourney captures

98% data accuracyeven with iOS & ad blockers
Book Free Demo NowGet 30-days-Money-Back-Guarantee
CTA visual