UTM Link Builder

Generate UTM tracking parameters for your ad campaigns. Select your platform to auto-fill dynamic macros.

Paste the output into the URL Parameters field in Facebook Ads Manager (at the ad level). Facebook appends it to your destination URL automatically. Dynamic macros like {{campaign.name}} are replaced with real values on each click.
Facebook dynamic macros reference
MacroReturns
{{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
Generated URL Parameters
Fill in the fields above to generate your UTM parameters

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

  1. Open Ads Manager and navigate to your ad.
  2. Scroll to the Tracking section and find the URL Parameters field.
  3. 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 Facebook and facebook as separate sources.
  • For Facebook, use paid_social as the medium to map to GA4's Paid Social channel grouping.
  • Include utm_id with 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