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
- GA4 Admin → Data Streams → your web stream → Configure Tag Settings → Configure your domains
- Add each domain that should share sessions: yourbrand.com, checkout.yourbrand.com, yourblog.com
- Include pattern: "Contains" then your domain root (e.g. "yourbrand.com")
- 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:
- GA4 Configuration tag → More Settings → Cross Domain
- Auto Link Domains: add each domain (yourbrand.com, checkout.yourbrand.com)
- Decorate Forms: enable if you have forms that submit across domains
- 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 →