How to Fix Reserved Keyword utm_source Errors (Complete Recovery Guide)

UTMGuard Team
8 min readattribution-errors

Your GA4 report shows:

  • "null" as a traffic source: 12,400 sessions
  • "undefined" as a traffic source: 3,800 sessions
  • "(not set)" with actual campaign data: 8,200 sessions

24,400 sessions with broken attribution.

Your campaigns are working. Your tracking isn't.

Reserved keywords—programming terms like "null," "undefined," and "none"—tell GA4 "no data exists" instead of "this is the campaign name."

Here's the complete fix process: identify broken campaigns, repair URLs, prevent future errors.

🚨 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

Step 1: Identify All Reserved Keyword Sources (5 minutes)

Check 1: GA4 Traffic Acquisition Report

  1. GA4 → Reports → Traffic Acquisition
  2. Date range: Last 90 days
  3. Search for each reserved keyword:
    • "null"
    • "undefined"
    • "(not set)"
    • "none"
    • "na"
    • "test"

Look at the source/medium column.

Red flags:

  • null / email (12,400 sessions)
  • undefined / social (3,800 sessions)
  • none / referral (2,100 sessions)
  • test / email (1,900 sessions)

These are your broken campaigns.

Note the session count and time period for each. This tells you:

  • How much traffic is misattributed
  • Which campaigns are affected
  • When the problem started (spike dates)

Check 2: Custom Exploration Report

Create detailed reserved keyword analysis:

  1. GA4 → Explore → Create blank exploration
  2. Dimensions: Session source, Session medium, Session campaign name, Date
  3. Metrics: Sessions, Conversions, Revenue
  4. Filters:
    • Session source contains "null" OR
    • Session source contains "undefined" OR
    • Session source equals "(not set)" OR
    • Session source equals "none" OR
    • Session source equals "test"
  5. Date range: Last 90 days

Export to CSV.

This gives you:

  • Complete list of broken campaigns
  • Timeline of when each appeared
  • Impact per campaign (sessions, conversions, revenue)

Check 3: Campaign Management System Audit

Pull all active campaign URLs from your system:

For email platforms (Mailchimp, Klaviyo, etc.):

  1. Export last 50 campaigns
  2. Include: Campaign name, send date, destination URLs
  3. Search URLs for: utm_source=null, utm_source=undefined, utm_source=test

For social schedulers (Buffer, Hootsuite, etc.):

  1. Export scheduled and published posts (last 90 days)
  2. Filter to posts with links
  3. Check each URL for reserved keywords

For partner/affiliate links:

  1. Request current link set from all partners
  2. Check each for reserved keywords in utm_source

For internal campaign tracker:

  1. Export all active campaigns
  2. Search utm_source column for: null, undefined, (not set), none, test

Check 4: Database Query (for developers)

If campaigns are stored in a database:

SELECT
  campaign_id,
  campaign_name,
  utm_source,
  utm_medium,
  utm_campaign,
  status,
  created_at,
  last_used_at
FROM campaigns
WHERE
  utm_source IN ('null', 'undefined', '(not set)', 'none', 'na', 'n/a', 'test', 'testing')
  OR utm_medium IN ('null', 'undefined', '(not set)', 'none', 'na', 'n/a', 'test', 'testing')
  OR utm_source = ''
  OR utm_medium = ''
ORDER BY last_used_at DESC;

Result: Complete list of campaigns with reserved keywords, sorted by most recently used.

😰 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

Step 2: Fix Active Campaigns (15 minutes)

Priority 1: Evergreen Campaigns (Fix Immediately)

These run continuously and accumulate broken data daily:

Email auto-responders:

  • Welcome sequences
  • Onboarding emails
  • Re-engagement campaigns
  • Abandoned cart emails

Website links:

  • Email signature links
  • Social media bio links
  • Footer links
  • Header navigation UTM-tagged links

Partner links:

  • Affiliate tracking URLs
  • Referral partner links
  • Integration partner URLs

Fix process:

  1. Identify the broken URL:

    ?utm_source=null&utm_medium=email&utm_campaign=welcome-series
    
  2. Replace with descriptive source:

    ?utm_source=newsletter&utm_medium=email&utm_campaign=welcome-series
    
  3. Update everywhere:

    • Email platform template
    • Website pages (bio links, signatures)
    • Partner link lists
    • Campaign management system
  4. Test in GA4 Realtime:

    • Click new URL in incognito browser
    • Wait 30 seconds
    • GA4 → Realtime report
    • Verify source shows as "newsletter" (not "(direct)")

Priority 2: Scheduled Campaigns (Fix Before Next Send)

Campaigns scheduled but not yet sent:

For email campaigns:

  1. Open each scheduled campaign
  2. Check destination URLs
  3. Find any with reserved keywords
  4. Update utm_source to descriptive name
  5. Re-save campaign

For social media posts:

  1. Review scheduled posts with links
  2. Edit any using reserved keywords
  3. Update URL with correct utm_source
  4. Reschedule post

For paid advertising:

  1. Review campaign destination URLs
  2. Update any using reserved keywords (or use platform auto-tagging instead)
  3. Update and save

Priority 3: Campaign Templates (Prevent Future Issues)

Email templates:

  1. Review all email templates with UTM parameters
  2. Replace placeholder values:
    • Before: utm_source=null
    • After: utm_source=newsletter

Social media templates:

  1. Update post templates
  2. Replace:
    • Before: utm_source=test
    • After: utm_source=[PLATFORM-NAME] (clear placeholder)

Partner link templates:

  1. Update partner link generator
  2. Replace:
    • Before: utm_source=null
    • After: utm_source=[PARTNER-DOMAIN]

Step 3: Handle Historical Data (What You Can & Can't Fix)

What You CANNOT Fix

Historical GA4 data is immutable.

Sessions already recorded as:

  • null / email (12,400 sessions)
  • undefined / social (3,800 sessions)

Will remain in your reports forever.

You cannot retroactively change how GA4 attributed past traffic.

What You CAN Do

Option 1: Add GA4 Annotation

Mark when you fixed the issue:

  1. GA4 → Admin → Property → Data display → Annotations
  2. Click "Add annotation"
  3. Date: (date you fixed the issue)
  4. Title: "Fixed reserved keyword UTM parameters"
  5. Description: "Replaced utm_source 'null', 'undefined', 'none', 'test' with descriptive names. Traffic before this date may show reserved keywords as sources. Traffic after this date has correct attribution."

Why this helps: Future analysis can filter data to "after annotation date" for accurate attribution.

Option 2: Custom Channel Grouping

Reclassify reserved keyword traffic in reports:

  1. GA4 → Admin → Data display → Channel groups
  2. Create custom channel group
  3. Add rule:
    • If source = "null" AND medium = "email" → Channel = "Email"
    • If source = "undefined" AND medium = "social" → Channel = "Social"
    • If source = "none" AND medium = "referral" → Channel = "Referral"

Why this helps: Future reports can use custom channel grouping to bucket historical misattributed traffic into correct channels.

Limitation: This is a manual mapping and may misclassify some traffic if multiple campaigns used the same reserved keyword.

Option 3: Export & Re-process (Advanced)

For detailed historical analysis:

  1. GA4 → Export → BigQuery (if enabled)
  2. Query raw data including utm_source = "null"
  3. Add secondary data (landing page, campaign ID if tracked)
  4. Manually reclassify based on contextual data

Why this helps: Allows retroactive attribution for high-value analysis (annual reports, board presentations).

Limitation: Requires BigQuery export and SQL knowledge.

What You SHOULD Do

Document the issue:

Create internal document:

Title: "Reserved Keyword UTM Issue (Fixed on [DATE])"

Contents:

  • List of reserved keywords used: null, undefined, none, test
  • Date range affected: [START DATE] to [FIX DATE]
  • Sessions impacted: 24,400
  • Estimated revenue misattributed: $XXX,XXX
  • Actual channel breakdown (best estimate):
    • Email: 12,400 sessions (was showing as "null / email")
    • Social: 3,800 sessions (was showing as "undefined / social")
    • Referral: 2,100 sessions (was showing as "none / referral")
    • Test campaigns: 1,900 sessions (was showing as "test / email")

Why this helps:

  • Explains data anomalies when reviewing historical reports
  • Prevents panic when someone discovers "null" traffic
  • Documents fix for future team members

Step 4: Fix the Root Cause (Prevent Forever)

Fix 1: Database Schema (for developers)

Current (problem):

CREATE TABLE campaigns (
  id INT PRIMARY KEY,
  utm_source VARCHAR(100) DEFAULT 'null',  -- PROBLEM
  utm_medium VARCHAR(100) DEFAULT 'null',  -- PROBLEM
  utm_campaign VARCHAR(100)
);

Fixed:

ALTER TABLE campaigns
  MODIFY utm_source VARCHAR(100) NOT NULL,
  MODIFY utm_medium VARCHAR(100) NOT NULL;
 
-- Remove any existing campaigns with reserved keywords
UPDATE campaigns
SET utm_source = 'newsletter'
WHERE utm_source IN ('null', 'undefined', '(not set)', 'none', 'test');

Result: Database now requires utm_source and utm_medium values. Cannot save campaign without them.

Fix 2: Validation Layer (for developers)

Add validation before URL generation:

const RESERVED_KEYWORDS = [
  'null', 'undefined', 'nil', 'none', 'na', 'n/a',
  '(not set)', '(not provided)', '(direct)', '(none)',
  'test', 'testing', 'temp', 'default', 'example', 'placeholder'
];
 
function validateUTMSource(source) {
  // Check if empty
  if (!source || source.trim() === '') {
    throw new Error('utm_source is required and cannot be empty');
  }
 
  // Check if reserved keyword
  if (RESERVED_KEYWORDS.includes(source.toLowerCase())) {
    throw new Error(`utm_source cannot be "${"{"}{"{"}source{"}"}{"}"}}". This is a reserved keyword. Use a descriptive name like "newsletter", "facebook", "partner-blog" instead.`);
  }
 
  // Check if only whitespace
  if (/^\s+$/.test(source)) {
    throw new Error('utm_source cannot contain only whitespace');
  }
 
  return true;
}
 
// Use before generating URL
validateUTMSource(campaign.utm_source);
validateUTMSource(campaign.utm_medium);

Result: System blocks URL generation if utm_source uses reserved keyword.

Fix 3: Campaign Tool Configuration

For email platforms:

  1. Settings → Google Analytics Tracking
  2. Set default utm_source: newsletter (not "null")
  3. Lock the default (prevent editing to "null")

For social schedulers:

  1. Settings → UTM Parameters
  2. Set default utm_source: {"{"}{"{"}platform{"}"}{"}"}} (dynamic variable)
  3. Validate: If variable resolution fails, block post scheduling

For custom UTM builders:

Add dropdown instead of free text:

utm_source options:

  • newsletter (Email campaigns)
  • facebook (Facebook organic)
  • instagram (Instagram organic)
  • linkedin (LinkedIn organic)
  • twitter (Twitter organic)
  • partner-[name] (Referral partners)
  • Custom (requires manager approval)

Result: Team can't accidentally type "null" — they must select from valid options.

Fix 4: Team Training

Training module: "Reserved Keywords Break Tracking"

Key points:

  1. Never use: null, undefined, none, test, placeholder
  2. These are programming terms meaning "no value"
  3. GA4 treats them as "missing data" (not campaign names)
  4. Use descriptive names: newsletter, facebook, partner-blog

Quiz question:

"Which utm_source values will break tracking in GA4?"

  • A) newsletter
  • B) null
  • C) facebook
  • D) undefined
  • E) partner-blog

Answer: B and D (reserved keywords)

✅ 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

Real Example: Complete Fix in 48 Hours

Client: SaaS company with 6-person marketing team Problem discovered: "null" as top traffic source (8,200 sessions/month)

Day 1 Morning (Identification - 2 hours):

  • GA4 audit: Found "null", "undefined", "test" as sources
  • Campaign system audit: 18 active campaigns with reserved keywords
  • Database query: 47 historical campaigns with reserved keywords

Day 1 Afternoon (Emergency Fixes - 3 hours):

  • Fixed 8 evergreen campaigns (welcome emails, bio links)
  • Updated 10 scheduled campaigns before next send
  • Tested all fixes in GA4 Realtime

Day 2 Morning (Root Cause Fixes - 4 hours):

  • Updated database schema (added NOT NULL constraints)
  • Added validation to campaign builder (block reserved keywords)
  • Updated all 12 campaign templates

Day 2 Afternoon (Prevention - 2 hours):

  • Documented forbidden keywords list
  • Created team training (15-minute session)
  • Set up weekly monitoring report

Results 30 days later:

  • Reserved keyword sessions: 0 (down from 8,200/month)
  • Proper email attribution: 7,800 sessions/month
  • Proper social attribution: 2,100 sessions/month
  • Proper referral attribution: 900 sessions/month
  • Revenue attribution accuracy: 94% (up from 68%)

Validation: Confirm Fixes Worked

Test 1: Realtime Verification (Immediate)

For each fixed campaign:

  1. Click new URL
  2. GA4 → Realtime report
  3. Verify source shows descriptive name (not "null", not "(direct)")

Test 2: Weekly Monitoring (7 days later)

  1. GA4 → Reports → Traffic Acquisition
  2. Search for: "null", "undefined", "(not set)", "none", "test"
  3. Should find ZERO new sessions (historical data remains)

Test 3: Source Distribution Analysis (30 days later)

Compare before/after:

Before fix (with reserved keywords):

  • Direct: 42%
  • null: 18%
  • undefined: 8%
  • Known channels: 32%

After fix (correct attribution):

  • Direct: 24%
  • Email: 20%
  • Social: 12%
  • Referral: 8%
  • Other: 36%

If you still see new reserved keyword traffic, active campaigns still have broken URLs.

FAQ

Can I fix historical data?

No. Historical GA4 data is immutable. You can add annotations and create custom channel groupings to improve future analysis, but past sessions stay as recorded.

Create redirect URLs under your control. Give partners yoursite.com/partner-offer, which redirects to product page with correct UTM parameters.

How long until fixed data appears?

Immediate. New sessions show correct attribution in GA4 Realtime within 30 seconds. Standard reports update within 24 hours.

Should I delete campaigns with reserved keywords?

No. Update them with correct utm_source values. Deleting campaigns loses historical documentation of what ran.

What if I find "test" traffic but don't know which campaign?

Check landing pages. GA4 → Add secondary dimension "Landing page" to identify which campaigns used "test" as source.

Can I use "NULL" in uppercase?

No. Avoid any variation of reserved keywords: NULL, Null, null, undefined, Undefined, NONE, None, none.

Prevention Checklist

✅ Immediate (one-time setup):

  • Document forbidden keywords list
  • Update database schema (NOT NULL constraints)
  • Add validation to campaign builder
  • Update all campaign templates
  • Train team on reserved keywords

✅ Before Every Campaign:

  • Check utm_source doesn't match forbidden list
  • Test URL in GA4 Realtime
  • Verify traffic shows correct source (not "(direct)")

✅ Weekly Monitoring:

  • GA4 search for: "null", "undefined", "test"
  • Investigate any new reserved keyword traffic
  • Fix broken campaigns within 24 hours

Conclusion

Traffic showing as "null", "undefined", or "test"?

You have reserved keyword utm_source values breaking attribution.

Complete fix process:

  1. Identify all broken campaigns (GA4 + campaign system audit)
  2. Fix active campaigns (replace reserved keywords with descriptive names)
  3. Document historical data impact (can't fix past, but can explain it)
  4. Fix root cause (database schema, validation, templates)
  5. Monitor weekly (ensure no new reserved keywords appear)

Never use programming concepts as UTM values. Use descriptive campaign names.

Fix this once, and your attribution stays accurate forever.


Related: Complete UTM Naming Rules Guide