Double Question Mark URL Error: Why GA4 Sees Corrupted Data
You checked your campaign URL. You saw TWO question marks:
shop.com?page=products?utm_source=facebook&utm_medium=cpc
↑ ↑
First ? Second ? (ERROR!)
GA4 shows corrupted campaign data. Some parameters tracked, others missing. Your attribution is a mess.
Two question marks breaks URL parsing. Here's why and how to fix it.
🚨 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: Only One ? Allowed
URLs can have only ONE question mark starting the query string:
✅ CORRECT:
shop.com?param1=value1¶m2=value2¶m3=value3
↑ ↑ ↑
First ? & separator & separator
❌ WRONG:
shop.com?param1=value1?param2=value2¶m3=value3
↑ ↑
First ? Second ? (breaks parsing)
Why This Happens
How Browsers Parse URLs
URL: shop.com?page=products&utm_source=facebook
↑
Question mark starts query string
Query string: page=products&utm_source=facebook
Parameters:
- page = products
- utm_source = facebook
With Double Question Marks
URL: shop.com?page=products?utm_source=facebook
↑ ↑
First ? Treated as part of value!
Query string: page=products?utm_source=facebook
Parameters:
- page = products?utm_source=facebook
- utm_source = MISSING (not parsed)
The browser treats the second ? as part of the first parameter's value.
😰 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 This Mistake Happens
Scenario 1: Concatenating URLs with Existing Parameters
// Base URL already has parameters
const baseUrl = 'shop.com?page=products';
// ❌ WRONG - Adds another ?
const campaignUrl = baseUrl + '?utm_source=facebook';
// Result: shop.com?page=products?utm_source=facebook
// ✅ CORRECT - Check for existing ?
const campaignUrl = baseUrl + '&utm_source=facebook';
// Result: shop.com?page=products&utm_source=facebookScenario 2: URL Builder Logic Error
function buildCampaignUrl(base, utms) {
// ❌ WRONG - Doesn't check if base has parameters
return base + '?' + utms;
}
// Input: buildCampaignUrl('site.com?sort=price', 'utm_source=email')
// Output: site.com?sort=price?utm_source=emailScenario 3: Copy-Paste Mistakes
You have: site.com?category=shoes
You want to add: ?utm_source=facebook&utm_medium=cpc
❌ Result: site.com?category=shoes?utm_source=facebook&utm_medium=cpc
↑
Double question mark
The Fix
Step 1: Find Double Question Marks
Search your campaign URLs for ?? or ?.*? patterns.
Step 2: Replace Second ? with &
❌ BEFORE:
shop.com?page=products?utm_source=facebook&utm_medium=cpc
✅ AFTER:
shop.com?page=products&utm_source=facebook&utm_medium=cpc
↑
Changed ? to &
Step 3: Use Smart Concatenation
function smartConcat(baseUrl, params) {
// Check if baseUrl already has parameters
const separator = baseUrl.includes('?') ? '&' : '?';
return baseUrl + separator + params;
}
// Usage
smartConcat('site.com', 'utm_source=facebook');
// Output: site.com?utm_source=facebook
smartConcat('site.com?page=1', 'utm_source=facebook');
// Output: site.com?page=1&utm_source=facebookReal Example: Email Platform Concatenation
Platform: Mailchimp campaign Problem: Email template with merge tag logic error
Template code:
<a href="{`{"{"}{"{"}website{"}"}{"}"}}`}?{"{"}{"{"}utm_parameters{"}"}{"}"}}">Click here</a>
Variables:
website = https://shop.com?category=products
utm_parameters = utm_source=mailchimp&utm_medium=email
Result:
https://shop.com?category=products?utm_source=mailchimp&utm_medium=email
↑
Double question mark
GA4 received:
page: category=products?utm_source=mailchimp&utm_medium=email
utm_source: (missing)
utm_medium: (missing)
Fix:
<a href="{`{"{"}{"{"}website{"}"}{"}"}}`}&{"{"}{"{"}utm_parameters{"}"}{"}"}}">Click here</a>
(Changed ? to & in template)
Or smarter template logic:
<a href="{`{"{"}{"{"}website{"}"}{"}"}}`}{{#if website contains '?'}}&{"{"}{"{"}else{"}"}{"}"}}?{{/if}}{"{"}{"{"}utm_parameters{"}"}{"}"}}">Click here</a>
✅ 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
FAQ
Can I have multiple question marks in a URL?
No. RFC 3986 defines only ONE question mark to start the query string. Additional parameters use &.
What if my parameter value contains a question mark?
URL-encode it: ?message=hello%3Fworld (%3F is encoded ?).
How do browsers handle multiple question marks?
They treat the second ? as part of the first parameter's value, not as a separator.
Will this break my links?
Yes. Parameter parsing breaks, causing tracking failures and potentially broken page functionality.
How do I prevent this in URL builders?
Add logic to check if the base URL already contains ? before adding parameters.
Conclusion
Double question marks break URL parameter parsing. Use only ONE ? to start the query string, then & for additional parameters.
❌ WRONG: site.com?param1=x?param2=y
✅ RIGHT: site.com?param1=x¶m2=y
Fix in 30 seconds: Replace the second ? with &.
Technical Reference: Multiple Question Marks Validation Rule