Cross-Domain Tracking Fix for GA4 and GTM | Adslytics | Adslytics

Conversion Fix How-To Guide

Cross-Domain Tracking Fix for GA4 and GTM

By Muhammad Farooq · March 30, 2026 · 5 min read
Cross-Domain Tracking Fix for GA4 and GTM

What Cross-Domain Tracking Is

Cross-domain tracking is needed when a user's session spans two different domains — for example, from yourbrand.com to checkout.yourbrand.com, or from yourblog.com to yourshoponline.com. Without configuration, each domain creates a separate session: the user appears to arrive at the checkout domain from direct traffic, and their journey from the marketing site is lost.

How GA4 Cross-Domain Tracking Works

GA4 passes a _gl parameter when a user crosses domain boundaries. This parameter contains the session and user identifiers, allowing the receiving domain to continue the existing session. The _gl parameter is appended to the outgoing link URL:

https://checkout.yourbrand.com/?_gl=1*abc123*_ga*NDk...

For this to work, both domains must be included in your cross-domain configuration, and both must have the GA4 tag installed.

Configuring Cross-Domain in GA4

  1. GA4 Admin → Data Streams → your web stream → Configure Tag Settings → Configure your domains
  2. Add each domain that should share sessions: yourbrand.com, checkout.yourbrand.com, yourblog.com
  3. Include pattern: "Contains" then your domain root (e.g. "yourbrand.com")
  4. GA4 will automatically append _gl parameter to links between these domains

Configuring Cross-Domain in GTM

If you are managing GA4 through GTM, configure cross-domain in the GA4 Configuration tag:

  1. GA4 Configuration tag → More Settings → Cross Domain
  2. Auto Link Domains: add each domain (yourbrand.com, checkout.yourbrand.com)
  3. Decorate Forms: enable if you have forms that submit across domains
  4. Accept Incoming: leave enabled (allow this domain to receive cross-domain parameters)

Common Cross-Domain Issues and Fixes

Issue: Checkout on a third-party platform (Shopify, Stripe, external booking)

If the checkout is on a completely separate domain that you do not control (payments.stripe.com, myshopify.com), you cannot add GA4 to that domain. The session will break at checkout. Fix: ensure the confirmation/thank-you page after checkout (which returns to your domain) has GA4 installed, and send purchase events from that page.

Issue: Links decorated with _gl but session still breaks

Check that the receiving domain has GA4 with the same Measurement ID installed. If GA4 is not on the receiving domain, the _gl parameter is received but ignored.

Issue: _gl parameter breaks URL tracking

The _gl parameter appears in URLs, which can affect Google Search Console data or UTM attribution. This is expected — GA4 strips _gl from the Page path dimension but it may appear in raw URL data.

Verification

Test cross-domain tracking in GTM Preview Mode: browse from domain A to domain B (via a link). The session in the Timeline should show the page view on domain B as part of the same GTM Preview session. In GA4 DebugView, the session from domain A and the page on domain B should appear under the same device/user.

Summary

Cross-domain tracking in GA4 requires configuring the domain list in both the GA4 Data Stream settings and the GTM GA4 Configuration tag. GA4 automatically appends _gl parameters to links between configured domains. Third-party checkout platforms (Stripe, Shopify-hosted checkout) cannot be added to the configuration — focus tracking on the post-checkout confirmation page on your domain.

See our Conversion Tracking Fix service for cross-domain configuration.

Need cross-domain tracking configured? Contact Adslytics.

Need expert tracking setup?

Our Google Tag Manager experts have delivered 500+ tracking setups with a 98% success rate.

Get a Free Consultation →
← Back to Blog
Muhammad Farooq

Author

Muhammad Farooq GTM & Analytics Expert · Adslytics Founder

Tracking specialist with 10+ years of experience in Google Tag Manager, GA4, Server-Side Tracking, and Google Ads. Founder of Adslytics — a dedicated analytics agency with a 98% success rate across 232+ projects on Upwork.

Top Rated Plus LinkedIn Visit the author's profile →