Add Required UTM Parameters to Facebook Ads (Step-by-Step)
Facebook traffic showing as referral? Add UTM parameters so GA4 can properly track your Facebook Ads campaigns and calculate ROI.
Your Facebook Ads are showing as referral traffic in GA4. You're spending money on ads but can't track campaign performance or calculate ROI.
You can fix this in 3 minutes by adding UTM parameters.
Table of contents
- What You're Fixing
- Current State (Broken Attribution)
- The 3-Minute Fix
- Step 1: Go to Facebook Ads Manager (30 seconds)
- Step 2: Add UTM Parameters (2 minutes)
- Step 3: Use Facebook's Dynamic Parameters
- Step 4: Apply to All Campaigns
- Step 5: Verify Tracking (30 seconds)
- What Changes After You Fix It
- Before (no UTMs):
- After (with UTMs):
- Advanced: Install Facebook Pixel for Conversion Tracking
- Troubleshooting Common Issues
- Issue 1: UTMs Not Appearing in GA4
- Issue 2: Facebook Conversion Tracking Stopped Working
- Issue 3: Duplicate Sessions in GA4
- Issue 4: Dynamic Parameters Not Populating
- Issue 5: Instagram Ads Not Tracking
- FAQ
- Will this break Facebook Pixel tracking?
- Why don't my Facebook and GA4 numbers match?
- Do I need this for Instagram Ads too?
- Can I track which Facebook placement drives conversions?
- What utmmedium should I use for Facebook Ads?
- How long does it take for UTMs to appear in GA4?
- Can I use the same UTMs for Facebook and Google Ads?
- Does this work for Facebook Messenger Ads?
- What about Facebook Lead Ads?
- Can I track Facebook Ads by audience?
- How do I track Facebook video ads separately from image ads?
- Related Resources
- Internal Guides
- Facebook Official Documentation
- GA4 Resources
- Conclusion
🚨 Not sure what's breaking your tracking?
Run a free 60-second audit to check all 40+ ways UTM tracking can fail.
Scan Your Campaigns Free✓ No credit card ✓ See results instantly
What You're Fixing
Facebook automatically adds fbclid (Facebook Click ID) to track clicks, but GA4 doesn't recognize fbclid for traffic classification.
Without UTM parameters, GA4 sees Facebook Ads as referral traffic from facebook.com.
Current State (Broken Attribution)
Your ad URL:
https://yoursite.com/shop
After user clicks (Facebook adds fbclid automatically):
https://yoursite.com/shop?fbclid=IwAR3xyz...
Result in GA4:
- Source/Medium:
facebook.com / referral - Channel: Referral (not Paid Social)
- Campaign: (not set)
- No attribution data
Why this happens: GA4 only recognizes click IDs from Google (gclid, gbraid, wbraid) and Microsoft (msclkid). Facebook's fbclid requires manual UTMs for GA4 attribution.
😰 Is this your only tracking issue?
This is just 1 of 40+ ways UTM tracking breaks. Most marketing teams have 8-12 critical issues they don't know about.
• 94% of sites have UTM errors
• Average: $8,400/month in wasted ad spend
• Fix time: 15 minutes with our report
✓ Connects directly to GA4 (read-only, secure)
✓ Scans 90 days of data in 2 minutes
✓ Prioritizes issues by revenue impact
✓ Shows exact sessions affected
The 3-Minute Fix
Step 1: Go to Facebook Ads Manager (30 seconds)
- Open Facebook Ads Manager
- Navigate to Ads tab
- Select ads to edit
Step 2: Add UTM Parameters (2 minutes)
- Click Edit
- Find Website URL field
- Add UTM parameters to the URL
Recommended UTM structure:
utm_source=facebook
utm_medium=paid-social
utm_campaign={campaign_name}
utm_content={ad_set_name}
utm_term={ad_name}
Example before fix:
https://yoursite.com/shop
Example after fix:
https://yoursite.com/shop?utm_source=facebook&utm_medium=paid-social&utm_campaign=spring_sale&utm_content=audience_25_34
Facebook will append fbclid when clicked:
https://yoursite.com/shop?utm_source=facebook&utm_medium=paid-social&utm_campaign=spring_sale&fbclid=IwAR...
Important: Both fbclid and UTMs work together without conflicts. GA4 reads the UTMs for classification and ignores the fbclid. Facebook Pixel uses fbclid for conversion tracking.
Step 3: Use Facebook's Dynamic Parameters
Facebook Ads Manager supports dynamic URL parameters for automated UTM population:
Dynamic UTM template:
?utm_source=facebook
&utm_medium=paid-social
&utm_campaign={{campaign.name}}
&utm_content={{adset.name}}
&utm_term={{ad.name}}
Available Facebook dynamic parameters:
{{campaign.name}}- Campaign name{{campaign.id}}- Campaign ID{{adset.name}}- Ad set name{{adset.id}}- Ad set ID{{ad.name}}- Ad name{{ad.id}}- Ad ID{{placement}}- Placement (Feed, Stories, Reels, etc.){{site_source_name}}- Platform (Facebook, Instagram, Audience Network)
Example with dynamic parameters:
https://yoursite.com/shop?utm_source={{site_source_name}}&utm_medium=paid-social&utm_campaign={{campaign.name}}&utm_content={{adset.name}}
Facebook automatically replaces parameters with actual values when ad is clicked.
Step 4: Apply to All Campaigns
Update UTMs for:
- All active campaigns
- All ad sets
- All individual ads
- Instagram Ads (run through Facebook Ads Manager)
Facebook Ads Manager hierarchy:
Campaign level → UTMs apply to all ads in campaign
↓
Ad set level → UTMs apply to ads in ad set
↓
Individual ad level → UTMs specific to single ad
Best practice: Add UTMs at campaign level for consistent tracking across all ads.
Step 5: Verify Tracking (30 seconds)
Test GA4 attribution:
- Click your ad from Facebook or Instagram
- Check the landing page URL in browser
- Verify both UTMs and fbclid present
- Check GA4 → Real-time report
- Confirm traffic shows as "facebook / paid-social"
What Changes After You Fix It
Before (no UTMs):
- Source/Medium:
facebook.com / referral - Channel: Referral
- Campaign: (not set)
- Content: (not set)
- Unable to track campaign performance or ROI
After (with UTMs):
- Source/Medium:
facebook / paid-social - Channel: Paid Social
- Campaign:
spring_sale - Content:
audience_25_34 - Full attribution, ROI tracking, and campaign optimization
Advanced: Install Facebook Pixel for Conversion Tracking
Facebook Pixel tracks conversions for Facebook Ads Manager (separate from GA4).
Base code (add to all pages):
<!-- Facebook Pixel Base Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>
<noscript>
<img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=YOUR_PIXEL_ID&ev=PageView&noscript=1"/>
</noscript>Conversion events (add to confirmation/thank-you pages):
// Purchase event
fbq('track', 'Purchase', {
value: 99.99,
currency: 'USD',
content_ids: ['PRODUCT-123'],
content_type: 'product',
num_items: 1
});
// Lead event
fbq('track', 'Lead', {
content_name: 'Newsletter Signup',
value: 10.00,
currency: 'USD'
});
// Add to cart
fbq('track', 'AddToCart', {
value: 49.99,
currency: 'USD',
content_ids: ['PRODUCT-123'],
content_name: 'Product Name',
content_type: 'product'
});
// Complete registration
fbq('track', 'CompleteRegistration', {
content_name: 'User Signup'
});Troubleshooting Common Issues
Issue 1: UTMs Not Appearing in GA4
Problem: Added UTMs to Facebook Ads but GA4 still shows "facebook.com / referral".
Cause: URL redirect stripping UTM parameters.
Fix:
- Check for landing page redirects (301/302)
- Ensure redirects preserve query parameters:
Javascript
// ❌ Wrong (loses UTMs) window.location = '/new-page'; // ✅ Correct (preserves UTMs) window.location = '/new-page' + window.location.search; - Test manually: Click ad and verify UTMs present in browser address bar
Issue 2: Facebook Conversion Tracking Stopped Working
Problem: After adding UTMs, Facebook conversions show zero.
Cause: Facebook Pixel not installed or misconfigured.
Fix:
- Verify Facebook Pixel installed on all pages
- Add conversion events to confirmation pages
- Test with Facebook Pixel Helper Chrome extension
- Verify events appear in Events Manager → Data Sources → Your Pixel → Overview
Issue 3: Duplicate Sessions in GA4
Problem: Each Facebook ad click creates 2 sessions.
Cause: Rare with Facebook Ads. Most likely cause is duplicate GA4 tracking tags.
Fix:
- Google Tag Manager → Check for duplicate GA4 configuration tags
- View page source → Verify GA4 snippet appears only once
- Remove redundant tracking implementations
Issue 4: Dynamic Parameters Not Populating
Problem: UTMs show {{campaign.name}} instead of actual campaign name.
Cause: Facebook parameter syntax error or Facebook caching old URL.
Fix:
- Verify exact syntax:
{{campaign.name}}(double curly braces, lowercase) - Wait 5-10 minutes for Facebook to update URL template
- Test with manual campaign name first, then add dynamic parameters
- Clear Facebook ad preview cache
Issue 5: Instagram Ads Not Tracking
Problem: Instagram Ads (run through Facebook Ads Manager) show as referral.
Cause: UTMs not added to ads served on Instagram placement.
Fix:
- Instagram Ads use same UTM setup as Facebook Ads
- Add UTMs at campaign level to cover all placements (Facebook, Instagram, Audience Network)
- Use dynamic parameter
{{site_source_name}}to differentiate Facebook vs Instagram traffic
FAQ
Will this break Facebook Pixel tracking?
No. Facebook Pixel operates independently and uses fbclid for attribution. UTMs are only for GA4 tracking. Both systems work simultaneously without conflicts.
Why don't my Facebook and GA4 numbers match?
Even with correct tracking, expect 5-15% variance due to:
- Ad blockers (block GA4, not Facebook Pixel)
- Privacy settings (iOS 14+ ATT restrictions)
- Attribution windows (Facebook: 7-day click/1-day view, GA4: last-click)
- Bot traffic filtering differences
- Facebook counts impressions differently than GA4 counts sessions
Do I need this for Instagram Ads too?
Yes. Instagram Ads run through Facebook Ads Manager and need the same UTM parameters. Use dynamic parameter {{site_source_name}} to automatically differentiate Facebook vs Instagram traffic in GA4.
Can I track which Facebook placement drives conversions?
Yes, use the {{placement}} dynamic parameter:
utm_content={{placement}}
This tracks performance across:
- Facebook Feed
- Facebook Stories
- Facebook Reels
- Instagram Feed
- Instagram Stories
- Instagram Reels
- Audience Network
What utm_medium should I use for Facebook Ads?
Recommended options:
paid-social(best - GA4 classifies as "Paid Social")cpc(also works - classified as "Paid Search")paidsocial(no hyphen - also works)
Best practice: utm_medium=paid-social for consistency across all social ad platforms.
How long does it take for UTMs to appear in GA4?
Real-time. Click your ad with UTMs and check GA4 Real-time report within seconds. Standard reports update within 24-48 hours.
Can I use the same UTMs for Facebook and Google Ads?
Use different campaign names to differentiate:
- Facebook Ads:
utm_campaign=facebook_spring_sale - Google Ads:
utm_campaign=google_spring_sale
This prevents attribution confusion across channels. Google Ads uses gclid (auto-tagging) so manual UTMs are optional for Google.
Does this work for Facebook Messenger Ads?
Yes. Messenger Ads (click-to-Messenger and Sponsored Messages) support UTM parameters when they include a website link. Add UTMs to the destination URL just like standard Facebook Ads.
What about Facebook Lead Ads?
Facebook Lead Ads collect leads directly within Facebook, so users don't visit your website. UTM tracking doesn't apply. However, if you include a "Learn More" link that goes to your website, add UTMs to that URL.
Can I track Facebook Ads by audience?
Yes, use utm_content or utm_term to identify audience segments:
utm_content=lookalike_purchasers
utm_content=interest_fitness
utm_content=retargeting_cart_abandoners
Then filter GA4 reports by utm_content to see audience-level performance.
How do I track Facebook video ads separately from image ads?
Use utm_content or utm_term to identify creative type:
utm_term=video_ad
utm_term=carousel_ad
utm_term=single_image_ad
utm_term=collection_ad
Related Resources
Internal Guides
- Facebook Ads Double Sessions Fix - Troubleshooting duplicate data
- Platform Click ID Conflicts - Auto-tagging across all platforms
- Complete UTM Tracking Guide (GA4 2025) - UTM fundamentals
- Fix Instagram UTM Conflict - Instagram-specific setup
Facebook Official Documentation
- Facebook Pixel Setup - Official pixel guide
- Facebook Conversions API - Server-side tracking
- URL Parameters - Dynamic URL parameters guide
- Events Manager - Track conversions
GA4 Resources
- GA4 Channel Grouping - Default channel definitions
Conclusion
Facebook Ads require manual UTM parameters for GA4 attribution. Unlike Google Ads (which has automatic gclid), Facebook's fbclid is not recognized by GA4.
Quick fix checklist:
- ✅ Add
utm_source=facebook&utm_medium=paid-social&utm_campaign={name}to all Facebook Ads destination URLs - ✅ Facebook automatically appends fbclid when ads are clicked
- ✅ GA4 reads UTMs for attribution (classifies as "Paid Social")
- ✅ Facebook Pixel uses fbclid for conversion tracking
- ✅ Both systems work together without conflicts
- ✅ Instagram Ads use same setup (run through Facebook Ads Manager)
Result: Proper Facebook/Instagram Ads attribution in GA4 + conversion tracking in Facebook Ads Manager + accurate ROI calculation for your campaigns.
Related Documentation:
✅ Fixed this issue? Great! Now check the other 39...
You just fixed one tracking issue. But are your Google Ads doubling sessions? Is Facebook attribution broken? Are internal links overwriting campaigns?
• Connects to GA4 (read-only, OAuth secured)
• Scans 90 days of traffic in 2 minutes
• Prioritizes by revenue impact
• Free forever for monthly audits
Join 2,847 marketers fixing their tracking daily