Facebook UTM Builder
Build UTM parameters for your Facebook and Instagram ads in seconds. This free Facebook UTM generator fills in Meta's dynamic values for you, so every click reaches GA4 or Shopify labeled with its campaign, ad set, ad and placement. Copy the string straight into Ads Manager, or tag a whole sheet of links at once. No sign-up, and it all runs in your browser.
Fills in Meta's dynamic values. Edit any field to change it.
Use this one. Paste it into the URL parameters field under Tracking. Meta fills in the {{ }} values when someone clicks.
Shows what the final link looks like. Meta fills in the {{ }} values only inside its ads.
| Row | URL | Tagged URL | Warnings |
|---|
Your links are tagged. Now let AI run the Meta ads behind them.
Madgicx is the agentic AI advertising platform for Meta ads. Its AI marketer finds what is working, prepares the next move and gets it done in one click, while you stay in control.
Try for Free ($0 Trial)How to use this Facebook UTM generator
Three steps, and the tool handles the formatting.
- Add your landing page. Enter the page your ad sends people to. If it already has its own parameters, such as
?color=red, or an#anchor, they stay where they belong. - Keep the preset or edit the fields. The Facebook preset fills utm_source, utm_medium, utm_campaign, utm_content and utm_term with Meta's dynamic values. Edit any field, or turn the preset off and type your own values. Anything you type is checked for spaces and capitals, with a one-click fix.
- Copy the string into Ads Manager. Use the first output, the URL parameters string. It never starts with ? or &, and it leaves every {{ }} value untouched so Meta can fill it in when someone clicks. The full tracking URL underneath shows what the final link will look like.
Meta's dynamic values, explained
Dynamic values are placeholders in double curly brackets. When someone clicks your ad, Meta replaces each one with the real detail of that ad. These are the eight the builder uses, as listed in Meta's specifications for dynamic URL parameters.
| Value | What it returns | Example |
|---|---|---|
{{campaign.name}} |
The campaign name, as it was when the ad was first published | Prospecting 2026 |
{{campaign.id}} |
The campaign's ID, which never changes | 120211234567890001 |
{{adset.name}} |
The ad set name, as it was when the ad was first published | Broad US |
{{adset.id}} |
The ad set's ID | 120211234567890002 |
{{ad.name}} |
The ad name, as it was when the ad was first published | Holiday video |
{{ad.id}} |
The ad's ID | 120211234567890003 |
{{placement}} |
Where the ad was shown | facebook_feed, instagram_stories, threads_stream |
{{site_source_name}} |
The app the click came from | fb (Facebook), ig (Instagram), msg (Messenger), an (Audience Network), th (Threads) |
Two details in Meta's documentation affect your reports. Name values are set when an ad is first published: if you rename a campaign later, its clicks keep the old name. And Meta sends a space as %20, so Prospecting 2026 travels as Prospecting%202026 and shows up in your reports with the space back in place. Dynamic values don't work in collection ads on Instagram placements, so tag those links with fixed values instead.
Where to paste the string in Meta Ads Manager
- In Meta Ads Manager, create a campaign or open one saved as a draft.
- Work through the ad setup until you reach the Tracking section of the ad.
- Under Tracking, paste the string into the URL parameters field. You can also click Build a URL parameter and add each one by hand, but pasting is faster.
- Click Apply if you used Build a URL parameter, then publish your ad.
Meta's guide to adding URL parameters adds two rules worth knowing. Whatever you put in the URL parameters field is added to the Website URL, and when the same key appears in both, the URL parameters field wins. Parameters set here also replace defaults set elsewhere, such as Instagram's default URL parameters.
Set your parameters before the ad goes live. Meta lets you change them on a published ad, but warns that the change may send the ad set back into the learning phase.
Why the preset looks like this
This is the setup we run on our own Meta ads:
utm_source={{site_source_name}}+{{placement}}&utm_medium=Paid&utm_campaign={{campaign.name}}+{{campaign.id}}&utm_content={{adset.name}}+{{adset.id}}&utm_term={{ad.name}}+{{ad.id}}
Each level of the account gets its own field: the campaign in utm_campaign, the ad set in utm_content and the ad in utm_term. Each one carries the name and the ID together.
Names keep reports readable. A row called Prospecting 2026 means something at a glance; a row of long numbers doesn't. IDs keep them traceable. Because Meta fixes name values when an ad is first published, a renamed campaign keeps reporting under its old name. The ID never changes, so you can always find the exact campaign, ad set or ad in Ads Manager, even months later.
utm_source joins the app and the placement, so a single field tells you it was Instagram and it was Stories. Most analytics tools read the + as a space, so that visit shows up as ig instagram_stories. utm_medium is Paid, which keeps paid clicks apart from your organic posts. If your other campaigns already use lowercase paid, change it here to match: what counts is that every campaign uses the same spelling.
Prefer shorter values? Turn off Add IDs next to names, and each field carries the name only.
Keep your UTM values consistent
GA4 treats every spelling as a separate value. Summer Sale, summer sale and summer-sale show up as three campaigns, and their results never add up in one row. That's why the builder flags spaces and capitals in anything you type and offers a fix: lowercase, with hyphens in place of spaces. Values from the preset are left as they are, because Meta fills them in from your real names and IDs.
The builder also keeps your link in one piece. Your page's own parameters stay in place, any utm_ value the tool sets replaces the old one instead of repeating it, and an #anchor moves to the end of the link, where it belongs. Values you type are encoded for the web, while the {{ }} values and the + signs stay exactly as Meta expects them.
Tag many links at once
Launching the same campaign across many products or pages? Open the Bulk tab. Paste rows straight from Google Sheets or Excel, or upload a CSV file. Put a header row first, with a url column and any of utm_source, utm_medium, utm_campaign, utm_content, utm_term and utm_id. Each row is tagged with its own values, and empty cells stay empty.
You get a preview table with a warning on any row that needs a look, a Copy all URLs button, and a CSV download with your original columns plus a new tagged_url column. The tool handles up to 500 rows at a time.
Where to find these values in GA4
Once clicks start coming in, open Reports, then Acquisition, then Traffic acquisition. Set the table's main dimension to Session source / medium to see each app and placement next to Paid, or to Session campaign to see your campaign names and IDs. With this preset, the ad set and the ad sit in utm_content and utm_term, which GA4 lists as Session manual ad content and Session manual term. If you fill in utm_id, it shows up as Session campaign ID.
Before you launch, test the link. Open the full tracking URL from the tool in a browser. The page should load with every parameter still in the address bar. If they disappear, the page redirects and drops them, and GA4 will never see them. Fix the redirect, or use the final address of the page as your Website URL. The {{ }} values stay as they are in this test, because Meta only fills them in when someone clicks a real ad.
What UTMs can and can't tell you
UTMs label the click. GA4, Shopify and most analytics tools read them to show which campaign, ad set and ad sent each visit, and what those visitors did on your site. Meta doesn't use them to count your sales: it counts conversions through its pixel and the Conversions API, and those events are what its ad delivery learns from. Meta's own guide says you need a website analytics tool to track the results of URL parameters.
UTMs also only cover the visit that came from the ad. If someone leaves and comes back on their own later, that later visit carries no parameters.
Frequently asked questions
How do I add UTM parameters to Facebook ads?
Build the string with the tool above, then paste it into the URL parameters field in the Tracking section of your ad in Meta Ads Manager. Use Meta's dynamic values, such as {{campaign.name}}, so each ad fills in its own details when someone clicks. The same string works across Facebook, Instagram, Messenger, Threads and Audience Network placements.
What does {{site_source_name}} return?
A short code for the app where the click happened: fb for Facebook, ig for Instagram, msg for Messenger, an for Audience Network and th for Threads. The preset pairs it with {{placement}}, so you see both the app and the exact placement, such as fb+facebook_feed.
Should I use names or IDs?
Both, if you can. Names make reports easy to read. IDs make them reliable: Meta fixes name values when an ad is first published, so a renamed campaign keeps reporting under its old name, while its ID never changes. The preset puts each name next to its ID. Turn off Add IDs next to names if you want names only.
Do UTMs help Meta track conversions?
No. UTMs are read by your analytics tools, such as GA4 and Shopify, to show where a visit came from. Meta counts purchases and other conversions through its pixel and the Conversions API, and it uses those events to decide who sees your ads. Use UTMs for your own reports, and check your Meta tracking separately.
Why don't my UTMs show up in GA4?
The most common causes are a redirect that drops the query string, a string pasted into the wrong field, or GA4 still processing the data, which can take up to 48 hours in standard reports. Also check the right report: Traffic acquisition, with Session source / medium or Session campaign. If the same key is in both the Website URL and the URL parameters field, Meta keeps the one in the URL parameters field.
Can I tag many links at once?
Yes. Open the Bulk tab, paste rows from a sheet or upload a CSV with a url column and any utm_ columns, and the tool tags up to 500 rows at a time. You get a preview with warnings per row, a Copy all URLs button and a CSV download with a tagged_url column added.
Is the tool free?
Yes. The Facebook UTM builder is free, with no sign-up and no limit on how often you use it. It runs in your browser, with no account and no server step.
Sending this traffic to a landing page? Score it first with the free Landing Page Analyzer.
More free tools
You scrolled so far. You want this. Trust us.
