troubleshootingUpdated 2025

Ampersand Breaking UTM Tracking: Fix & Symbol in Parameter Values

& in UTM campaign name truncating all parameters after it? Encode ampersand as %26 to preserve full campaign tracking in GA4.

6 min readtroubleshooting

Your campaign name is "save & win" but GA4 only shows "save". Everything after the & is missing.

Unencoded ampersands break parameter parsing. Here's the 60-second fix.

🚨 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

The Problem

Code
❌ BROKEN:
?utm_campaign=save&win

Browser parses as:
utm_campaign = "save"
win = "" (new parameter with no value)

GA4 receives: campaign = "save"
Missing: "& win"

The & symbol is a reserved URL character. It separates parameters.

When you use & in a parameter value without encoding, the browser thinks you're starting a new parameter.

Why It Happens

Ampersand (&) is the parameter separator in URLs:

Code
✅ CORRECT USAGE (separating parameters):
?utm_source=facebook&utm_medium=cpc&utm_campaign=spring
                    ↑              ↑
             Parameter separators

But when & appears INSIDE a value:

Code
❌ WRONG (& in value, not encoded):
?utm_campaign=save&win&utm_medium=cpc
              ↑   ↑
         Intended as part of campaign name
         Parsed as parameter separator

Result:
- utm_campaign = "save"
- win = ""
- utm_medium = "cpc"

Real Example

Company: E-commerce retailer Campaign: "Buy 1 & Get 1 Free" promotion Budget: $25,000 Facebook ads URL: ?utm_campaign=buy1&get1free

Result in GA4:

  • Campaign name: "buy1"
  • Everything after & lost

Impact:

  • Could not identify "Buy 1 & Get 1" campaign in reports
  • Data split: some sessions showed "buy1", some showed nothing
  • $25,000 spend with truncated attribution
  • Could not measure actual promo performance

Encoding the & would have preserved full tracking.

😰 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

The Fix

Option 1: Encode as %26

Code
❌ BEFORE:
?utm_campaign=save&win

✅ AFTER:
?utm_campaign=save%26win

GA4 shows: "save&win" (decoded automatically)

Option 2: Replace with "and"

Code
❌ BEFORE:
?utm_campaign=save&win

✅ AFTER:
?utm_campaign=save-and-win

GA4 shows: "save-and-win"

Option 3: Remove Ampersand

Code
❌ BEFORE:
?utm_campaign=buy1&get1

✅ AFTER:
?utm_campaign=buy1get1

GA4 shows: "buy1get1"

Quick Encoding Script

Javascript
function encodeUtmValue(value) {
    // Encode all special characters including &
    return encodeURIComponent(value);
}
 
// Usage
const campaign = "save & win";
const encoded = encodeUtmValue(campaign);
console.log(encoded);
// Output: save%20%26%20win
//              ↑  ↑
//          space  ampersand
 
// Build full URL
const url = `https://site.com?utm_campaign=${"{"}{"{"}encoded{"}"}{"}"}}`;
console.log(url);
// https://site.com?utm_campaign=save%20%26%20win
 
// GA4 receives: "save & win" (automatically decoded)

How Browsers Parse Ampersands

Code
Example URL:
https://site.com?utm_campaign=save&win&utm_medium=cpc

Browser interpretation:
Parameter 1: utm_campaign = "save"
Parameter 2: win = "" (no value provided)
Parameter 3: utm_medium = "cpc"

URLSearchParams output:
utm_campaign: "save"
win: ""
utm_medium: "cpc"

GA4 receives:
Campaign: "save"
Medium: "cpc"
(Everything between & symbols is lost or misinterpreted)

Detection Script

Javascript
function detectUnencodedAmpersand(url) {
    const params = new URL(url).searchParams;
    const issues = [];
 
    params.forEach((value, key) => {
        // Check if value contains unencoded &
        // (encoded & appears as %26 in raw query string)
        const rawQuery = url.split('?')[1] || '';
        const paramPattern = new RegExp(`${"{"}{"{"}key{"}"}{"}"}}=([^&]*)`);
        const match = rawQuery.match(paramPattern);
 
        if (match) {
            const rawValue = match[1];
            // If raw value contains & but not %26, it's unencoded
            if (rawValue.includes('&') && !rawValue.includes('%26')) {
                issues.push({
                    parameter: key,
                    value: value,
                    problem: 'Contains unencoded ampersand',
                    fix: `Encode as ${encodeURIComponent(value)}`
                });
            }
        }
    });
 
    return issues;
}
 
// Usage
const url = 'site.com?utm_campaign=save&win';
console.log(detectUnencodedAmpersand(url));
// [{ parameter: 'utm_campaign', value: 'save', problem: 'Contains unencoded ampersand', ... }]

Testing After Fix

Step 1: Check URL Structure

Code
✅ CORRECT:
https://site.com?utm_campaign=save%26win&utm_medium=cpc
                             ↑   ↑
                         Encoded &

Each %26 in URL = one & in the final value

Step 2: Test in Browser

Code
1. Visit URL: https://site.com?utm_campaign=save%26win
2. Open browser console
3. Run: new URL(location.href).searchParams.get('utm_campaign')
4. Should output: "save&win" (decoded)

Step 3: Verify in GA4

Code
1. Visit corrected URL
2. Open GA4 → Realtime
3. Check "Traffic acquisition"
4. Campaign should show complete value: "save&win"

Common Ampersand Scenarios

Scenario 1: Company Name with &

Code
❌ WRONG:
utm_source=johnson&johnson

✅ RIGHT:
utm_source=johnson%26johnson

GA4 shows: "johnson&johnson"

Scenario 2: Product Names

Code
❌ WRONG:
utm_content=shoes&boots

✅ RIGHT:
utm_content=shoes%26boots

GA4 shows: "shoes&boots"

Scenario 3: Promotional Copy

Code
❌ WRONG:
utm_campaign=save-big&act-fast

✅ RIGHT:
utm_campaign=save-big%26act-fast

GA4 shows: "save-big&act-fast"

Platform-Specific Handling

Code
Value Tracking Template:
`{"{"}{"{"}lpurl{"}"}{"}"}}`?utm_campaign=buy1%26get1free&gclid=`{"{"}{"{"}gclid{"}"}{"}"}}`
                         ↑
                    Pre-encoded & in campaign name

Facebook Ads

Code
URL Parameters field:
utm_source=facebook&utm_campaign=spring%26summer
                                     ↑
                               Encoded &

Email Platforms

Html
<!-- Pre-encode in template -->
<a href="https://site.com?utm_campaign=save%26win&utm_source=email">
    Click Here
</a>
 
<!-- Platform's click tracking preserves %26 -->

Prevention Checklist

Code
Before launching campaigns:

✅ Scan all UTM values for & symbols
✅ Replace with:
   - %26 (encoded, preserves &)
   - "and" (readable alternative)
   - Remove (if not needed)
✅ Use encodeURIComponent() for automation
✅ Test URL in browser console
✅ Verify in GA4 Real-Time

✅ 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

Why does & break URLs?

& is reserved as the parameter separator. Using it in values without encoding confuses URL parsers.

Should I always encode & to %26?

Yes, if you want the & to appear in GA4. Alternative: replace with "and" or remove.

What if my platform auto-encodes?

Test it. Some platforms encode, some don't. Always verify the final URL received by users.

Can I use & in the base URL?

Yes. & is only problematic when used INSIDE parameter values. Between parameters, & is correct.

Code
✅ CORRECT:
?param1=value1&param2=value2
              ↑
         & separating parameters (correct)

❌ WRONG:
?param1=value&value
            ↑
         & inside value (must encode as %26)

Conclusion

Unencoded & in UTM values breaks parameter parsing. Fix: Encode as %26.

Code
❌ utm_campaign=save&win
✅ utm_campaign=save%26win
✅ utm_campaign=save-and-win

Use encodeURIComponent() to automatically encode all special characters including &.


Technical Reference: Ampersand Not Encoded Validation Rule

UTM

Get Your Free Audit in 60 Seconds

Connect GA4, run the scan, and see exactly where tracking is leaking budget. No credit card required.

Trusted by growth teams and agencies to keep attribution clean.