UTM Link Builder
Generate UTM tracking parameters for your ad campaigns. Select your platform to auto-fill dynamic macros.
{{campaign.name}} are replaced with real values on each click.
Facebook dynamic macros reference
| Macro | Returns |
|---|---|
{{campaign.id}} | Campaign ID (numeric) |
{{campaign.name}} | Campaign name at publish time |
{{adset.id}} | Ad set ID (numeric) |
{{adset.name}} | Ad set name at publish time |
{{ad.id}} | Ad ID (numeric) |
{{ad.name}} | Ad name at publish time |
{{placement}} | Where the ad appeared (e.g. Facebook_Mobile_Feed, Instagram_Stories) |
{{site_source_name}} | Platform: fb, ig, msg, or an |
What Are UTM Parameters?
UTM (Urchin Tracking Module) parameters are tags you add to the end of a URL. When someone clicks a tagged link, Google Analytics records the source, medium, and campaign name so you can see exactly which ads, emails, or posts drive traffic and conversions.
There are five standard UTM parameters: utm_source (where the traffic comes from), utm_medium (the marketing channel), utm_campaign (the specific campaign), utm_term (paid search keywords), and utm_content (differentiating similar content or ads).
How to Use UTM Parameters in Facebook Ads
- Open Ads Manager and navigate to your ad.
- Scroll to the Tracking section and find the URL Parameters field.
- Paste the query string from this tool (without a leading
?). Facebook appends it to your destination URL automatically.
Use dynamic macros like {{campaign.name}} so Facebook fills in real campaign, ad set, and ad names per click. Note that name macros freeze at publish time — if you rename a campaign after launch, older clicks still report the original name. Include IDs alongside names for reliable data joins.
Facebook vs. Google: Dynamic Parameters Compared
Facebook provides both name and ID macros (e.g. {{campaign.name}} and {{campaign.id}}). Google Ads only provides numeric IDs natively like {campaignid} and {adgroupid}. To get human-readable campaign names in Google, create a custom parameter such as {_campaignname} and set its value manually at the campaign level.
UTM Best Practices
- Use lowercase consistently. Google Analytics treats
Facebookandfacebookas separate sources. - For Facebook, use
paid_socialas the medium to map to GA4's Paid Social channel grouping. - Include
utm_idwith the campaign ID — GA4 requires it for cost data imports. - Keep naming conventions consistent across your team. Document your UTM taxonomy.
Want AI to handle your marketing?
Stop tagging links manually. Let an AI CMO plan, execute, and track your campaigns end to end.
Try AI Marketing Machine