Cross-Domain Tracking in GA4: Diagnosis and Solution
The Case File
When users navigate between your main website and a separate domain—say, from yourcompany.com to shop.yourcompany.co.uk or from your marketing site to a third-party payment processor—GA4 treats each domain transition as a new user starting a new session. Without proper cross-domain tracking configuration, the user journey fragments. What should appear as one continuous path becomes multiple disconnected sessions, each with a different attribution source.
This check measures whether your GA4 property is configured to maintain user and session continuity across multiple root domains. While subdomains are automatically tracked (e.g., blog.yourcompany.com and shop.yourcompany.com work out of the box), separate domains—especially those with different country code TLDs (.com, .co.uk, .de) or entirely different domain names—require manual configuration.
The Root Causes (Why This Happens)
Cross-domain tracking failures stem from several technical layers:
1. Missing GA4 Admin Configuration
The most common cause: domains aren't listed in the GA4 data stream settings. GA4 uses the _gl linker parameter to pass client ID and session ID between domains. Without explicitly configuring which domains should share this data, GA4 won't append the _gl parameter to outbound links, and each domain operates in isolation.
2. GTM Misconfiguration
If you're using Google Tag Manager instead of native gtag.js, cross-domain tracking requires additional setup. You must:
Add the linker parameter to your GA4 Configuration tag's Fields to Set section
List all target domains in the linker configuration (e.g., {"domains": ["example.com", "shop.example.co.uk"]})
Ensure your GA4 Configuration tag fires on all pages across all domains
Missing any of these steps breaks the linker parameter chain.
3. JavaScript Execution Order Issues
The _gl parameter is added when a user clicks a link. The click event must bubble up to the document level for GA4 to intercept it and decorate the URL. If your site uses:
JavaScript redirects (e.g., window.location.href = ...)
Immediate form submissions without user interaction
SPA (Single Page Application) navigation that bypasses standard link clicks
...the linker parameter may never be appended. GA4's automatic link decoration only works for standard <a> tag clicks.
4. Cookie Domain Mismatches
If you've manually set a custom cookie_domain parameter in your GA4 tag configuration, it can interfere with cross-domain tracking. GA4 expects cookies to be scoped to the current domain. Overriding this with a broad domain setting (e.g., .example.com) can cause the linker parameter to be ignored.
5. Third-Party Payment Processors and Checkout Flows
Many businesses use external platforms (Stripe, PayPal, Shopify Checkout) that redirect users to a separate domain. Unless you:
Configure cross-domain tracking for these external domains
Add them to your referral exclusion list (if they redirect back)
Ensure the payment processor preserves URL parameters
...users will appear as new referral traffic when they return from checkout.
The "So What?" (Business Impact)
Broken cross-domain tracking has cascading consequences:
Attribution Fragmentation: Your marketing reports show inflated session counts and underreported conversion paths. A user who clicks a Google Ad, visits your main site, then completes a purchase on your checkout domain appears as:
Session 1: Google / CPC (main site visit)
Session 2: Referral / yourcompany.com (checkout domain visit)
The conversion gets attributed to "Referral" instead of "Google / CPC," destroying your ROAS calculations and making paid campaigns appear less effective than they are.
Inflated User and Session Metrics: Each domain transition creates a duplicate user. Your "Users" metric becomes meaningless. A single customer journey across three domains registers as three separate users, making engagement metrics unreliable.
Broken Funnel Analysis: If your funnel spans multiple domains (e.g., landing page → product page → external checkout), you can't accurately measure drop-off rates. Users "disappear" at domain boundaries, making it impossible to optimize conversion paths.
Self-Referral Pollution: When users return from the secondary domain to your main site, your own domain appears as a referral source. Traffic reports become cluttered with self-referrals, obscuring actual external traffic sources.
The Investigation (How to Debug)
You can manually verify cross-domain tracking issues without Watson:
Method 1: Check for the _gl Parameter
Open your website in an incognito browser window
Navigate to a page with a link to your secondary domain
Right-click the link and select Inspect (or open Developer Tools → Network tab)
Click the link and watch the URL in the browser address bar
Look for ?_gl=1* in the destination URL
If the _gl parameter is missing, cross-domain tracking is not working.
Method 2: Traffic Acquisition Report Analysis
In GA4, go to Reports → Acquisition → Traffic Acquisition
Add a secondary dimension: Session source / medium
Filter for sessions where the source is your own domain name
If you see your own domain as a referral source, sessions are breaking at domain boundaries.
Method 3: DebugView Real-Time Testing
Enable Debug Mode (install the Google Analytics Debugger Chrome extension or add ?debug_mode=true to your URL)
Navigate to Admin → DebugView in GA4
Click through your cross-domain user flow
Watch for session_start events firing when you transition between domains
If a new session_start fires on the secondary domain, the session is breaking.
Method 4: User Explorer Path Analysis
Go to Reports → User → User Explorer (or Explore → User Explorer)
Select a user who visited multiple domains
Review the Event timeline
If you see multiple first_visit or session_start events with different referrers for what should be one journey, tracking is broken.
The Solution (How to Fix)
Option A: Native GA4 Configuration (Recommended)
This method works if you're using the native GA4 tag (gtag.js) or the Google tag directly on your site.
Step 1: Configure Domains in GA4 Admin
Log in to Google Analytics and select your GA4 property
Navigate to Admin (bottom left)
Under Data collection and modification, click Data Streams
Select your web data stream
Scroll down and click Configure tag settings
In the Settings section, click Configure your domains
Click Add condition and select domain contains
Enter each domain you want to track (e.g., example.com, shop.example.co.uk, checkout.example.com)
Do not include http:// or https://
Do not include paths (e.g., /checkout)
Use the root domain only
Click Save
Step 2: Verify Referral Exclusions (Usually Automatic)
GA4 automatically adds configured cross-domain domains to the referral exclusion list. However, if you're seeing self-referrals:
In the same Configure tag settings screen, click Show more
Click List unwanted referrals
Confirm your secondary domains are listed
If not, manually add them
Option B: Google Tag Manager Configuration
If you're using GTM to deploy GA4, follow these steps:
Step 1: Configure GA4 Admin (Same as Above)
Complete the GA4 Admin configuration in Option A first.
Step 2: Update Your GA4 Configuration Tag in GTM
Open Google Tag Manager and select your container
Navigate to Tags and open your GA4 Configuration Tag
Expand Fields to Set
Add a new field:
Field Name: linker
Value: {"domains":["example.com","shop.example.co.uk"]}
Replace with your actual domains (comma-separated, in quotes)
Save the tag
Click Preview to test in debug mode
Navigate between domains and confirm the _gl parameter appears in URLs
Submit and Publish your container
Step 3: Ensure Tag Fires on All Domains
Verify your GA4 Configuration tag has a trigger set to All Pages
Confirm GTM is installed on every domain you're tracking
Test that the tag fires on both domains using Preview mode
Case Closed
Manually investigating cross-domain tracking issues requires checking multiple reports, testing URL parameters, and validating session continuity across domains—a process that can take 30+ minutes per property. The Watson Analytics Detective dashboard spots this Info-level check instantly, alongside 60+ other data quality issues. Watson automatically flags whether your cross-domain configuration is complete, showing you exactly which domains are tracked and which user journeys are breaking.
Stop hunting for attribution gaps manually. Let Watson audit your GA4 setup in seconds :www.analyticsdetectives.com/watson