Webclat / GTM Practice

Cross-domain tracking in Google Tag Manager

If your GA4 tag is deployed through GTM, the domains list that keeps a session alive across two domains lives on the tag configuration - not in a settings screen most teams remember to check.

Quotable summary

For a GA4 Configuration tag deployed through Google Tag Manager, cross-domain measurement is set on the tag itself - the Configure Cross-Domain Measurement field lists every domain that should be treated as one continuous experience, and GTM decorates outbound links to those domains with a linker parameter. This is the deployment half of the fix: it controls whether the parameter gets attached at all. Whether the receiving domain then reads that parameter correctly is a GA4 reporting-side question, covered on our GA4 cross-domain tracking guide.

What breaks by default

A GA4 tag's session cookie is scoped to the domain it was set on. The instant a visitor's browser navigates to a second domain, that cookie is invisible there - the receiving domain has no way to know "same visitor, same session" unless the click carried proof with it. That proof is the _gl linker parameter, and getting it attached correctly is entirely a tag-deployment concern.

The GTM-side fix

  1. Open the GA4 Configuration tag in your container.
  2. Under Fields to Set / Cross-Domain Measurement (depending on GTM's current UI labeling), add every domain that should share one continuous session.
  3. Confirm this is the only place the domains list is set for a GTM-deployed tag - a separate list set inside GA4's own Admin UI applies to direct gtag.js installs, and having both can create confusing, inconsistent behavior if they disagree.
  4. Publish, then verify with a real click (see below) before considering it done.

Verifying the linker actually works

Configuration alone doesn't prove decoration happened. Open Preview mode, click an actual link that crosses to the second domain, and check the resulting URL - either in the address bar or the Network tab - for a _gl= query parameter. No parameter means the decoration step itself isn't firing, which is a different failure than a domains list that's simply incomplete.

A redirect between the click and the final landing page (an SSO hop, a URL shortener, a marketing-automation click tracker) can strip the parameter even when GTM decorated the link correctly - trace the full chain, not just the first hop, when a fix doesn't seem to be taking.

The reporting half

Getting the parameter to survive the trip is only the deployment half of this problem. What GA4 does with that parameter once it arrives - whether the session actually continues correctly in reporting - is governed by GA4's own configuration and reporting identity settings, covered in full on the GA4-side cross-domain tracking guide.

Common questions

  • Do I set the domains list on the GTM tag or in GA4's own admin interface?
    If GA4 is deployed through a GTM Configuration tag, that tag's own fields are the one that matters at runtime - GA4's Admin UI setting is for properties using a direct gtag.js install. Keep only one as the source of truth and document which, since a mismatch between the two is a common, hard-to-notice cause of inconsistent behavior.
  • How do I verify cross-domain tracking is actually working, not just configured?
    Open Preview mode, click an actual link to the second domain, and check the destination URL in the browser's address bar or Network tab for the _gl query parameter. A correctly configured domains list with no _gl parameter appearing on the actual click means the decoration itself isn't happening, which is a different problem from a misconfigured list.
  • Does this fix conversion tracking that spans two domains, like a marketing site and a separate checkout?
    It fixes session continuity, which is a prerequisite for accurate conversion attribution across that boundary - but conversion tracking itself (the purchase or lead event firing correctly on the second domain) is a separate tag configuration that needs its own verification.

Sessions Splitting Across Two Domains?

We check the tag configuration, the actual decoration, and hand off to the GA4 reporting side if that's where the real gap is.

Get Cross-Domain Tracking Fixed