What This Rule Detects
Detects URLs containing more than one question mark (?) character. URLs can only have ONE ? to separate the path from query parameters. Additional ? characters corrupt parameter parsing, causing everything after the second ? to become part of the previous parameter's value instead of being parsed as separate parameters.
š 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:
- Unpredictable tracking behavior - Parameters parsed incorrectly
- Data corruption - Parameter values include unintended text
- Fragmented reporting - Same campaign appears in multiple broken forms
- Broken links - Some platforms reject URLs with multiple
? - Attribution errors - UTM values contaminated with subsequent parameters
Technical Impact:
- The
?character has special meaning: It marks the start of the query string - When multiple
?exist, only the FIRST one is treated as query separator - Everything after the second
?becomes the VALUE of the previous parameter - Parameter parsing stops at second
?, losing subsequent parameters entirely - Creates malformed parameter values that don't match campaign names
Real Example:
- Intended URL:
example.com?page=1&utm_source=google&utm_medium=cpc - Malformed URL:
example.com?page=1?utm_source=google&utm_medium=cpc - What GA4 receives:
page = "1?utm_source=google&utm_medium=cpc"(wrong!)utm_source = (not set)(lost!)utm_medium = (not set)(lost!)
- Result: Direct traffic, 100% tracking failure
Common Scenarios
Scenario 1: Double Query String Concatenation
Combining two URLs with existing query parameters:
Scenario 2: Encoded URL as Parameter Value
Passing a full URL as a parameter without proper encoding:
Scenario 3: Copy-Paste Error from Multiple Sources
Accidentally duplicating the ? when building URLs manually:
š° 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 URL Query String Syntax
URL structure rule:
https://example.com/path?param1=value1¶m2=value2¶m3=value3
ā ā ā
ā ā āā Third parameter (use &)
ā āā Second parameter (use &)
āā First parameter (use ?)
ONE question mark, MULTIPLE ampersands
Critical rules:
- ā
Use
?ONCE to start query string - ā
Use
&to separate ALL additional parameters - ā Never use
?between parameters - ā Never use multiple
?characters
Step 2: Identify Multiple Question Marks
Check your URL:
- Count the
?characters in your URL - There should be EXACTLY ONE
- If you find 2 or more, you have this error
Detection pattern:
ā example.com?page=1?utm_source=google (2 question marks)
ā example.com?id=123?source=fb?medium=cpc (3 question marks!)
ā
example.com?page=1&utm_source=google (1 question mark, correct)
Step 3: Fix the URL Structure
Simple fix - Replace extra ? with &:
Example 1:
ā Before: example.com?page=1?utm_source=google&utm_medium=cpc
ā
After: example.com?page=1&utm_source=google&utm_medium=cpc
Replace ? with & ā^
Example 2:
ā Before: shop.com?category=shoes?color=blue?utm_source=facebook
ā
After: shop.com?category=shoes&color=blue&utm_source=facebook
^ ^
Replace both ? with &
Example 3 (URL as parameter - requires encoding):
ā Before: example.com?redirect=https://other.com?id=123&utm_source=email
ā
After: example.com?redirect=https://other.com%3Fid%3D123&utm_source=email
^ ^
Encode ? as %3F and = as %3D in parameter values
Step 4: Handle URLs Within Parameter Values
Special case: If you're passing a URL as a parameter value, you MUST URL-encode it:
Wrong approach:
ā example.com?next=https://destination.com?param=value&utm_source=google
Problem: Second ? breaks parsing
Correct approach:
ā
example.com?next=https%3A%2F%2Fdestination.com%3Fparam%3Dvalue&utm_source=google
Encoding:
- : ā %3A
- / ā %2F
- ? ā %3F
- = ā %3D
Use URL encoding tools:
- JavaScript:
encodeURIComponent("https://destination.com?param=value") - Python:
urllib.parse.quote("https://destination.com?param=value") - Online: urlencoder.org
Step 5: Update All Campaign URLs
Where to fix:
- Social media ads: Facebook, LinkedIn, Twitter ad platforms
- Email campaigns: ESP link builder (Mailchimp, SendGrid, etc.)
- Display ads: Google Display Network, programmatic platforms
- Affiliate links: Partner URL templates
- QR codes: Regenerate with corrected URLs
- Spreadsheets: Update any URL databases or tracking sheets
Verification:
- Find/replace all URLs with multiple
? - Replace second and subsequent
?with& - Test 5-10 sample URLs
- Click test URLs and verify GA4 Real-Time shows correct attribution
- Deploy corrected URLs across all platforms
Examples
ā Incorrect Examples
https://example.com?page=1?utm_source=google&utm_medium=cpc
Parsed as:
- page = "1?utm_source=google&utm_medium=cpc" (WRONG)
- No other parameters recognized
Result: GA4 receives no UTM data, appears as Direct traffic
https://shop.com/products?id=123?category=shoes?utm_source=facebook
Parsed as:
- id = "123?category=shoes?utm_source=facebook" (WRONG)
Result: Complete parameter corruption, 100% tracking failure
https://example.com?redirect=https://other.com?next=page&utm_source=email
Parsed as:
- redirect = "https://other.com?next=page" (breaks after second ?)
- utm_source parameter lost
Result: Tracking fails, redirect may break
ā Correct Examples
https://example.com?page=1&utm_source=google&utm_medium=cpc
Parsed as:
- page = "1"
- utm_source = "google"
- utm_medium = "cpc"
Tracking: SUCCESS (all parameters captured correctly)
https://shop.com/products?id=123&category=shoes&utm_source=facebook
Parsed as:
- id = "123"
- category = "shoes"
- utm_source = "facebook"
Tracking: SUCCESS (proper parameter separation)
https://example.com?redirect=https%3A%2F%2Fother.com%3Fnext%3Dpage&utm_source=email
Parsed as:
- redirect = "https://other.com?next=page" (decoded correctly)
- utm_source = "email"
Tracking: SUCCESS (URL encoding preserves both parameters and nested URL)
GA4 Impact Analysis
Parameter Parsing:
- Only the first
?is recognized as query separator - Everything after second
?becomes part of previous parameter's value - Subsequent parameters are completely lost
- Results in malformed parameter values
Session Attribution:
- UTM parameters after second
?are not extracted - Traffic appears as Direct / (none)
- Campaign names corrupted or missing
- Source/medium values lost entirely
Channel Grouping:
- Traffic misclassified as Direct channel
- Paid campaigns show zero sessions
- Email/social campaigns invisible in reports
- Channel analysis completely broken
Data Fragmentation:
- Same campaign appears in multiple corrupted forms:
- "google?utm_medium=cpc"
- "facebook?utm_medium=social"
- Each malformed value creates separate entry
- Reports show dozens of broken parameter variants
- Makes campaign consolidation impossible
Reporting Impact:
- Campaign reports: Show incomplete or malformed campaign names
- Source/Medium reports: Missing or corrupted values
- Conversion attribution: Lost for affected traffic
- ROI calculation: Impossible with corrupted campaign data
Detection in UTMGuard
UTMGuard automatically detects multiple question marks:
- Scans all page URLs in your GA4 data
- Counts question mark characters in each URL
- Flags any URL with 2 or more
?characters - Reports affected session count
- Shows malformed parameter values
- Suggests corrected format with
&separators
Audit Report Shows:
- Total sessions with multiple
?characters - List of malformed URLs
- Corrupted parameter values
- Corrected URL format
- Session count per broken URL pattern
Related Validation Rules
Related Validation Rules
Frequently Asked Questions
Q: How do I know if my URL has multiple question marks?
A: Manually count the ? characters in your URL. Or paste the URL into your browser and check the address bar - browsers often show warnings. Or use UTMGuard to scan all your URLs automatically.
Q: What if I need to pass a URL as a parameter?
A: You must URL-encode the nested URL. Use encodeURIComponent() in JavaScript or online encoding tools. The ? in the nested URL becomes %3F.
Q: Will browsers automatically fix this?
A: No. Browsers strictly follow the rule: first ? starts query string, everything after second ? is treated as text. No automatic correction happens.
Q: Can this cause 404 errors?
A: Not typically, but the page may not load correctly if it expects specific parameter values and receives corrupted data instead.
Q: Does this affect all analytics platforms?
A: Yes. This is a fundamental URL syntax issue. All web servers, browsers, and analytics tools follow the same query string parsing rules.
Q: How do I fix this in bulk across hundreds of URLs?
A: Export your campaign URLs to a spreadsheet, use find/replace to change all instances of ?param= to ¶m= (except the first ?), then update all platforms with corrected URLs.
Q: What's the difference between ? and &?
A: ? marks the START of the query string (use once). & separates parameters within the query string (use multiple times). Think of ? as "query string begins here" and & as "and here's another parameter".
Q: Can I use # instead of additional ??
A: No! The # character is for URL fragments (anchor links) and comes AFTER query parameters. Correct order: path?query#fragment. Never use # to separate parameters.
External Resources
- RFC 3986: URL Query String Syntax
- W3C URL Standard
- Google Campaign URL Builder
- MDN Web Docs: URL Structure
ā 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
multiple_question_marks