What This Rule Detects
Detects when the ampersand character (&) appears inside a UTM parameter value instead of being properly encoded as %26. Since & is a special URL delimiter used to separate parameters, having it inside a value breaks URL parsing, causing everything after the unencoded & to be interpreted as a new parameter rather than part of the current value.
š Want to scan for this issue automatically?
UTMGuard checks for this and 39 other validation rules in 60 seconds.
Try Free AuditWhy It Matters
Business Impact:
- 100% tracking corruption for affected parameters
- Parameter value truncation - Only part before & is captured
- Lost subsequent parameters - Everything after & parsed incorrectly
- Campaign name fragmentation - "shoes&boots" becomes "shoes" in reports
- Data reliability destroyed - Cannot trust parameter values
Technical Impact:
- The
&character separates query parameters in URLs - When
&appears in a value, parser treats it as parameter separator - Everything after the unencoded
&becomes a new parameter name - Original parameter value is truncated at the
& - Subsequent "parameter" has no value (appears as name without =)
- Creates malformed query string structure
Real Example:
- Intended URL:
example.com?utm_campaign=shoes&boots&utm_medium=email - Intended campaign name: "shoes&boots"
- What browser/GA4 parses:
utm_campaign = "shoes"(truncated at &!)boots = ""(interpreted as new parameter with no value)utm_medium = "email"(correctly parsed)
- Result: Campaign name is "shoes" instead of "shoes&boots", plus a meaningless "boots" parameter
Common Scenarios
Scenario 1: Ampersand in Product Names
Using & to represent "and" in campaign names:
Scenario 2: Brand Names with Ampersands
Companies with & in their name:
Scenario 3: Descriptive Content Tags
Using & in ad creative descriptions:
š° 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
How to Fix
Step 1: Understand Why Ampersands Break URLs
The ampersand's special role:
URL structure: example.com?param1=value1¶m2=value2¶m3=value3
^ ^
Parameter separators
The & character tells the parser: "This parameter is done, next parameter starts now"
What happens with unencoded &:
Intended: utm_campaign=shoes&boots (campaign name is "shoes&boots")
Parsed as:
- utm_campaign=shoes (value ends at &)
- boots (new parameter with no value)
Instead of: utm_campaign = "shoes&boots"
You get: utm_campaign = "shoes"
boots = "" (orphaned parameter)
Step 2: Choose Your Encoding Strategy
Option A: Replace & with Words (RECOMMENDED)
Why recommended:
- ā Human-readable URLs
- ā No encoding/decoding needed
- ā Works everywhere
- ā Professional appearance
- ā Easy to understand in reports
How to do it:
ā "shoes&boots" ā ā
"shoes-and-boots"
ā "fast&affordable" ā ā
"fast-and-affordable"
ā "Johnson&Johnson" ā ā
"johnson-and-johnson"
ā "men&women" ā ā
"men-and-women"
Option B: URL-Encode as %26
When to use:
- When you must preserve exact text with &
- For automated systems expecting literal &
- When brand names legally require &
How to do it:
ā "shoes&boots" ā ā
"shoes%26boots"
ā "AT&T" ā ā
"AT%26T"
ā "Q&A" ā ā
"Q%26A"
Comparison:
Replace with words: utm_campaign=shoes-and-boots (17 chars, readable)
URL encode: utm_campaign=shoes%26boots (13 chars, technical)
Recommendation: Use "and" for clarity unless encoding is required
Step 3: Fix All Parameter Values with &
Step-by-step process:
1. Identify all ampersands in parameter values:
Original: example.com?utm_campaign=shoes&boots&utm_content=fast&cheap
Ampersands in values: "shoes&boots" (1 &), "fast&cheap" (1 &)
2. Choose replacement strategy:
Option A - Replace with words:
utm_campaign=shoes-and-boots&utm_content=fast-and-cheap
Option B - URL encode:
utm_campaign=shoes%26boots&utm_content=fast%26cheap
3. Verify correct & placement:
ā
Correct: Between parameters
example.com?utm_campaign=value1&utm_medium=value2
^
Parameter separator
ā Wrong: Inside parameter values
example.com?utm_campaign=value&value
^
Breaks parsing!
Step 4: Implement Naming Conventions
Best practices for campaign naming:
Avoid & entirely:
- ā
summer-sale-2024 - ā
shoes-and-boots - ā
fast-affordable-shipping - ā
summer&sale&2024 - ā
shoes&boots - ā
fast&affordable
For brand names with &:
- ā
barnes-and-noble(replace with words) - ā
barnes%26noble(URL-encode if required) - ā
barnes&noble(breaks tracking)
For descriptive tags:
- ā
men-women-kids(use hyphens) - ā
quick-easy-setup(readable) - ā
men&women&kids(parsing error)
Step 5: Update All Campaign URLs
Where to fix:
1. Email campaigns:
- Mailchimp: Edit campaign links
- SendGrid: Update link templates
- HubSpot: Modify email URLs
- Constant Contact: Fix destination links
2. Social media:
- Facebook Ads Manager: Edit final URLs
- LinkedIn Campaign Manager: Update destination URLs
- Twitter/X Ads: Fix link parameters
- Instagram bio links: Correct landing pages
3. Paid advertising:
- Google Ads: Update final URLs
- Microsoft Ads: Edit destination URLs
- Display networks: Fix creative links
4. Content marketing:
- Blog post links
- Social media bios
- Email signatures
- QR code destinations
Bulk fix process:
- Export all campaign URLs to spreadsheet
- Find all instances of
&inside parameter values - Replace with
-and-or encode as%26 - Verify URLs parse correctly
- Test 5-10 samples in GA4 Real-Time
- Deploy corrected URLs
Examples
ā Incorrect Examples
https://example.com?utm_campaign=shoes&boots&utm_medium=email
Parsed as:
- utm_campaign = "shoes" (truncated!)
- boots = "" (orphaned parameter)
- utm_medium = "email"
Result: Campaign name shows as "shoes" in GA4, not "shoes&boots"
Impact: Data fragmentation, incomplete campaign names
https://shop.com?utm_source=partner&associates&utm_medium=referral&utm_campaign=spring
Parsed as:
- utm_source = "partner" (truncated!)
- associates = "" (orphaned)
- utm_medium = "referral"
- utm_campaign = "spring"
Result: Source appears as "partner" instead of "partner&associates"
Impact: Partner misattribution, reporting confusion
https://example.com?utm_content=fast&affordable&utm_source=facebook
Parsed as:
- utm_content = "fast" (truncated!)
- affordable = "" (orphaned)
- utm_source = "facebook"
Result: Content tag incomplete, appears as "fast" not "fast&affordable"
Impact: Cannot distinguish between variations, A/B testing fails
ā Correct Examples
https://example.com?utm_campaign=shoes-and-boots&utm_medium=email
Parsed as:
- utm_campaign = "shoes-and-boots"
- utm_medium = "email"
Result: Complete campaign name captured
Tracking: SUCCESS (full attribution)
https://shop.com?utm_source=partner-associates&utm_medium=referral&utm_campaign=spring
Parsed as:
- utm_source = "partner-associates"
- utm_medium = "referral"
- utm_campaign = "spring"
Result: All parameters captured correctly
Tracking: SUCCESS (accurate partner attribution)
https://example.com?utm_content=fast-affordable&utm_source=facebook
Parsed as:
- utm_content = "fast-affordable"
- utm_source = "facebook"
Result: Complete content tag, readable in reports
Tracking: SUCCESS (A/B testing works correctly)
GA4 Impact Analysis
Parameter Value Truncation:
- UTM values cut off at unencoded
& - Example: "shoes&boots" becomes "shoes"
- Campaign names incomplete in reports
- Cannot differentiate between truncated variants
Orphaned Parameters:
- Text after
&becomes parameter name without value - Example:
&bootsparsed as parameter "boots" with no value - Creates meaningless parameters in data
- Clutters parameter reports with nonsense values
Data Fragmentation:
- Same campaign appears in multiple truncated forms
- "shoes&boots" might appear as:
- "shoes" (if & not encoded)
- "shoes-and-boots" (if fixed later)
- "shoes%26boots" (if URL encoded)
- Makes campaign consolidation impossible
Reporting Impact:
- Campaign reports: Show incomplete campaign names
- Source/Medium reports: Truncated source values
- Content reports: Missing ad variation details
- ROI calculation: Wrong campaign attribution
Conversion Attribution:
- E-commerce revenue: Attributed to truncated campaign names
- Lead forms: Incomplete source identification
- Multi-touch attribution: Breaks with malformed parameters
Detection in UTMGuard
UTMGuard automatically detects unencoded ampersands:
- Scans all page URLs in your GA4 data
- Parses query string parameters
- Identifies
&characters inside parameter values - Reports affected parameters and values
- Shows truncated value vs intended value
- Suggests encoded (%26) or hyphenated alternatives
Audit Report Shows:
- Total sessions with unencoded
&in parameters - List of affected URLs
- Parameter values that are truncated
- Suggested corrections (replace with "and" or encode as %26)
- Session count per broken pattern
Related Validation Rules
Related Validation Rules
Frequently Asked Questions
Q: Why can't browsers automatically fix this?
A: Browsers strictly follow URL parsing rules where & separates parameters. There's no way for a browser to know if & is meant as a separator or part of a value - it always treats it as a separator.
Q: Should I use %26 or replace with "and"?
A: Replace with "and" (e.g., "shoes-and-boots") for better readability. Use %26 only when you must preserve the exact & character (e.g., brand names like "AT&T" ā "AT%26T").
Q: What about HTML entities like &?
A: Never use HTML entities in URLs. URLs require percent-encoding, not HTML encoding. Use %26, not &.
Q: Will this affect my historical data?
A: Yes, historical data is already truncated and cannot be recovered. The fix only prevents future tracking errors.
Q: Can I use other symbols instead of &?
A: Yes! Use + (plus), / (slash), or simply words. But avoid other special URL characters: ?, #, =, %. Hyphens and underscores are always safe.
Q: How do I encode & in JavaScript?
A: Use encodeURIComponent("shoes&boots") which returns "shoes%26boots". For full URLs, use encodeURI().
Q: What if my CMS automatically adds &?
A: Your CMS might be inserting & in URL fields. Check URL building settings, escape/encoding options, and consider custom URL field validation.
Q: Do URL shorteners fix this?
A: No. Shorteners preserve the destination URL exactly as provided. If the destination has unencoded &, the problem remains.
External Resources
- RFC 3986: URL Reserved Characters
- MDN: URL Encoding
- Google Campaign URL Builder
- W3C: URL Encoding Reference
ā 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
ampersand_not_encoded