šŸ”“CriticalImpact: Parameter corruption - unpredictable tracking behavior
šŸ“„Category: url-syntax

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 Audit

Why 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

Get Your Free Audit Report

How to Fix

Step 1: Understand URL Query String Syntax

URL structure rule:

https://example.com/path?param1=value1&param2=value2&param3=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:

  1. Count the ? characters in your URL
  2. There should be EXACTLY ONE
  3. 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:

  1. Social media ads: Facebook, LinkedIn, Twitter ad platforms
  2. Email campaigns: ESP link builder (Mailchimp, SendGrid, etc.)
  3. Display ads: Google Display Network, programmatic platforms
  4. Affiliate links: Partner URL templates
  5. QR codes: Regenerate with corrected URLs
  6. Spreadsheets: Update any URL databases or tracking sheets

Verification:

  1. Find/replace all URLs with multiple ?
  2. Replace second and subsequent ? with &
  3. Test 5-10 sample URLs
  4. Click test URLs and verify GA4 Real-Time shows correct attribution
  5. 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:

  1. Scans all page URLs in your GA4 data
  2. Counts question mark characters in each URL
  3. Flags any URL with 2 or more ? characters
  4. Reports affected session count
  5. Shows malformed parameter values
  6. 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

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 &param= (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

āœ… 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


Last Updated: November 9, 2025
Rule ID: multiple_question_marks
Severity: Critical
Category: Url Syntax