Cost Data Import Failure: Missing Platform Click IDs in GA4

UTMGuard Team
7 min readattribution

Kevin Brooks managed $450,000 in annual ad spend across Google, Facebook, and LinkedIn. Every month, he opened GA4's Advertising workspace expecting to see campaign ROI.

Every month: All costs showed $0.00.

Sessions were tracked. Conversions recorded. Revenue calculated. But the entire cost side of the ROI equation was missing.

For 8 months, he made budget decisions in the dark because GA4 couldn't import cost data. The problem? His campaigns were missing the platform click IDs that GA4 needs for cost matching.

🚨 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 Is Cost Data Import?

Cost data import = GA4's ability to pull advertising costs from platforms (Google Ads, Meta, etc.) and merge with session data for complete ROI reporting.

What You Get With Cost Data Import

Complete attribution metrics:

MetricFormulaRequires Cost Import
ROAS (Return on Ad Spend)Revenue ÷ Cost✅ Yes
CPA (Cost Per Acquisition)Cost ÷ Conversions✅ Yes
CPC (Cost Per Click)Cost ÷ Clicks✅ Yes
Profit MarginRevenue - Cost✅ Yes
Ad Impression ShareImpressions ÷ Total Available✅ Yes

Without cost import: You only see sessions, conversions, and revenue. Can't calculate profitability.

How Cost Import Works

The matching process:

  1. User clicks ad → Platform adds click ID (gclid, fbclid, etc.)
  2. User lands on site → GA4 captures click ID + session data
  3. GA4 requests cost data → Sends click IDs to ad platform API
  4. Platform returns costs → Matched by click ID
  5. GA4 merges data → Sessions + costs = complete attribution

Critical requirement: Click IDs must be present for matching to work.

Why Cost Import Fails

Reason 1: Auto-Tagging Disabled

Most common cause of missing click IDs

Google Ads auto-tagging OFF:

Landing URL: https://site.com?utm_source=google&utm_medium=cpc
Missing: gclid parameter

Result: GA4 can't match to Google Ads cost data

Check in Google Ads:

  1. Settings → Account settings
  2. Auto-tagging: OFF
  3. Result: No gclid added to URLs

Impact:

CampaignActual CostGA4 ShowsProblem
Brand Search$23,000$0❌ No gclid
Shopping$45,000$0❌ No gclid
Display$18,000$0❌ No gclid
Total$86,000$0Unusable

Reason 2: Click ID Stripped by Redirects

URL redirects removing click IDs

Example flow:

1. User clicks ad:
   https://site.com?gclid=CjwKCAiA...&utm_campaign=brand

2. Site redirects to:
   https://site.com/landing-page

3. Click ID lost:
   Missing gclid parameter

4. GA4 receives:
   https://site.com/landing-page (no gclid)

Common redirect culprits:

  • WordPress permalinks
  • URL shorteners
  • Server-side redirects
  • JavaScript redirects
  • Mobile app deep linking

Impact: Even with auto-tagging enabled, click IDs don't reach GA4.

😰 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

Get Your Free Audit Report

Reason 3: utm_id Without Platform Click IDs

Using utm_id alone doesn't work for cost import

Broken setup:

utm_id=brand_search_q4&utm_source=google&utm_medium=cpc

Present: utm_id
Missing: gclid
Result: Cost import fails

GA4 needs BOTH:

  • Platform click ID (gclid, fbclid, etc.) - for cost matching
  • utm_id (optional) - for campaign grouping

Correct setup:

gclid=CjwKCAiA...&utm_id=brand_search_q4&utm_source=google&utm_medium=cpc

Present: gclid ✅ and utm_id ✅
Result: Cost import works

Reason 4: Cross-Domain Tracking Issues

Click ID lost during domain transfer

Example:

1. Ad clicks to: shop.yoursite.com?gclid=abc123
2. User redirects to: www.yoursite.com (different subdomain)
3. gclid parameter lost
4. Cost import fails

Solution: Configure GA4 cross-domain measurement to preserve click IDs.

Even with click IDs, link must be active

Check GA4 → Admin → Product Links:

PlatformLink StatusImpact
Google Ads❌ Not linkedNo cost import
Meta Ads❌ Not linkedNo cost import
Microsoft Ads⚠️ Linked but import disabledNo cost import

All three must be true:

  1. Auto-tagging enabled (click IDs captured)
  2. Platform linked to GA4
  3. Cost data import enabled

How to Diagnose Cost Import Failures

Step 1: Check If Cost Data Is Missing

GA4 → Reports → Acquisition → Traffic Acquisition

Add metric: Advertiser ad cost

What you see:

Source   | Medium | Sessions | Cost      | Status
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
google   | cpc    | 23,445   | $0.00     | ❌ Problem
facebook | cpc    | 12,334   | $0.00     | ❌ Problem
bing     | cpc    | 5,667    | $1,234.56 | ✅ Working

If cost = $0 for active paid campaigns: Cost import is broken.

Step 2: Check Click ID Capture

GA4 → Reports → Realtime

  1. Click a test ad
  2. Check Realtime report within 30 seconds
  3. Look for session details
  4. Verify click ID parameters present

What to check:

Session details:
Source: google
Medium: cpc
Campaign: brand_search
gclid: CjwKCAiA... ✅ (Present - Good)

If gclid missing: Auto-tagging not working or click ID stripped.

Step 3: Test Auto-Tagging

Click test ad and inspect landing URL:

Google Ads test:

Expected: https://site.com?gclid=CjwKCAiA...&other_params
Actual: https://site.com?utm_source=google&utm_medium=cpc

Problem: gclid missing (auto-tagging disabled)

Facebook Ads test:

Expected: https://site.com?fbclid=IwAR2x...&other_params
Actual: https://site.com?utm_source=facebook&utm_medium=cpc

Problem: fbclid missing

GA4 → Admin → Product Links

Google Ads Links:

  • Link status: Active ✅ / Not linked ❌
  • Import cost data: Enabled ✅ / Disabled ❌

Meta Ads Links:

  • Connection: Active ✅ / Not connected ❌
  • Import settings: Configured ✅ / Not configured ❌

If not linked: Cost data can't import even with click IDs working.

Step 5: Check for Click ID Stripping

Run test with browser dev tools:

  1. Open browser dev tools (Network tab)
  2. Click test ad
  3. Monitor redirects
  4. Check if gclid persists through all redirects

Example analysis:

Request 1: https://site.com?gclid=abc123 ✅ (gclid present)
Redirect 1: https://site.com/page ❌ (gclid lost)
Final URL: https://site.com/page ❌ (gclid not in GA4)

Problem: Redirect stripped gclid parameter

How to Fix Cost Import Failures

Fix 1: Enable Auto-Tagging

Google Ads:

  1. Settings → Account settings
  2. Auto-tagging: Turn ON
  3. Save changes
  4. Test: Click ad, verify gclid in URL

Microsoft Ads:

  1. Campaigns → Settings
  2. Enable UET auto-tagging
  3. Save
  4. Test: Click ad, verify msclkid in URL

Other platforms:

  • Facebook: Auto-enabled (fbclid added by default)
  • TikTok: Auto-enabled (ttclid)
  • LinkedIn: Requires Insight Tag for li_fat_id

Fix 2: Preserve Click IDs Through Redirects

WordPress .htaccess fix:

# Preserve gclid, fbclid through redirects
RewriteCond %{"{"}{"{"}QUERY_STRING{"}"}{"}"}} (gclid|fbclid|msclkid|ttclid)=([^&]+)
RewriteRule ^(.*)$ /$1?%{"{"}{"{"}QUERY_STRING{"}"}{"}"}} [L,R=301]

JavaScript redirect fix:

// Preserve all parameters during redirect
function redirectWithParams(targetURL) {
  const params = new URLSearchParams(window.location.search);
  const newURL = targetURL + '?' + params.toString();
  window.location.href = newURL;
}

Server-side redirect (Node.js example):

app.get('/redirect', (req, res) => {
  const targetURL = 'https://destination.com/page';
  const queryParams = req.query; // Preserve all params including gclid
  const finalURL = targetURL + '?' + new URLSearchParams(queryParams);
  res.redirect(301, finalURL);
});

Link Google Ads:

  1. GA4 → Admin → Product Links → Google Ads links
  2. Click "Link"
  3. Select Google Ads account
  4. Enable data import options:
    • ✅ Import cost data
    • ✅ Import clicks and impressions
  5. Save

Link Meta Ads:

  1. GA4 → Admin → Product Links → Meta Ads links
  2. Click "Link"
  3. Authenticate with Meta Business account
  4. Enable cost data import
  5. Save

Verify links active:

  • Check link status: Active ✅
  • Check import settings: Enabled ✅
  • Wait 24-48 hours for first data import

Fix 4: Configure Cross-Domain Tracking

If using multiple domains/subdomains:

GA4 configuration:

  1. GA4 → Admin → Data Streams → Web
  2. Configure tag settings
  3. Configure your domains:
    • Add all domains: yoursite.com, shop.yoursite.com
  4. Enable Cross-domain measurement
  5. Save

Updated tracking code:

gtag('config', 'G-XXXXXXXXXX', {
  'linker': {
    'domains': ['yoursite.com', 'shop.yoursite.com']
  }
});

Benefit: Click IDs preserved across domain/subdomain navigation.

Fix 5: Validate Complete Setup

End-to-end test:

✅ Platform auto-tagging enabled
✅ Click test ad
✅ Landing URL contains click ID
✅ GA4 Realtime shows click ID captured
✅ GA4 linked to ad platform
✅ Cost import enabled
✅ Wait 24-48 hours
✅ Check GA4 cost reports show actual spend

Prevention: Maintain Cost Import Health

1. Monthly Cost Data Audit

Check these monthly:

# Cost Import Health Check
 
## Click ID Capture
- [ ] Google Ads auto-tagging: ON
- [ ] Facebook auto-adds fbclid: Verified
- [ ] Microsoft UET auto-tagging: ON
- [ ] Test clicks contain correct click IDs
 
## GA4 Platform Links
- [ ] Google Ads link: Active
- [ ] Meta Ads link: Active
- [ ] Microsoft Ads link: Active (if applicable)
- [ ] Cost import: Enabled for all
 
## Cost Data Accuracy
- [ ] All campaigns showing cost data
- [ ] Cost matches ad platform spend
- [ ] No unexplained $0 costs
- [ ] Import delays < 48 hours

2. Alert on Cost Import Failures

Set up GA4 custom alert:

Alert condition:

  • Metric: Advertiser ad cost
  • Condition: Decreases by > 90%
  • Lookback: Compared to previous day

Trigger: Email notification to marketing team

Why: Catches cost import failures immediately.

3. Redirect Audit

Test all site redirects preserve click IDs:

# Redirect Test Checklist
 
Test URL: https://site.com?gclid=test123&utm_campaign=test
 
Redirects to test:
- [ ] Mobile redirects
- [ ] HTTPS redirects
- [ ] Subdomain redirects
- [ ] Language/locale redirects
- [ ] Campaign landing page redirects
 
For each redirect:
- [ ] gclid parameter preserved
- [ ] Final URL contains gclid=test123

✅ 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

Run Complete UTM Audit (Free Forever)

Join 2,847 marketers fixing their tracking daily

FAQ

How long does cost data take to appear in GA4?

Typical import delay:

  • Google Ads: 24-48 hours
  • Meta Ads: 24-48 hours
  • Microsoft Ads: 24-72 hours

If longer than 72 hours: Check platform link and import settings.

Can I manually import cost data without click IDs?

Yes, using GA4 Data Import:

  1. Create CSV with cost, clicks, impressions
  2. Match on utm_campaign or utm_id
  3. Upload to GA4 → Admin → Data Import

Downside: Manual process, not automatic like click ID matching.

What if I disabled auto-tagging months ago?

Historical data can't be recovered.

Going forward:

  1. Enable auto-tagging now
  2. New sessions will have click IDs
  3. Future cost data will import
  4. Note the date you fixed it for reporting purposes

Does auto-tagging affect my UTM parameters?

No. Auto-tagging and manual UTMs work together:

Example URL:

https://site.com?gclid=abc123&utm_source=google&utm_medium=cpc&utm_campaign=brand

Both present:
- gclid (auto-tagging)
- UTM parameters (manual)

GA4 uses both for comprehensive tracking.

Why does cost show in Google Ads but not GA4?

Common causes:

  1. GA4-Google Ads link broken - Check Admin → Product Links
  2. Cost import disabled - Enable in link settings
  3. Click IDs not captured - Check auto-tagging
  4. Data delay - Wait 48 hours after enabling

Can I see which sessions are missing click IDs?

Yes, in GA4 Explorations:

  1. Create Exploration
  2. Dimension: Session source
  3. Dimension: Google click ID (gclid)
  4. Metric: Sessions
  5. Filter: gclid = (not set) AND source = google

Shows: Google sessions without gclid (cost import will fail for these).


Related: UTM ID Without Platform Rule