GA4 cross-domain tracking: set it up and prove sessions survive the journey
GA4 cross-domain tracking preserves browser and session identity when a visitor moves between related domains. Use the same web data stream, configure the participating domains and test the actual journey through links, forms and redirects. The destination must adopt the expected identifiers and collect the right business event. Seeing a linker parameter in the URL is only one part of that proof.
On this page
What is cross-domain tracking and when do you need it?
Cross-domain tracking carries measurement identifiers between domains through a navigation URL. It helps preserve one browser's continuous journey across a marketing site, app, checkout or booking service. Google's cross-domain developer guide
Start by mapping the journey you actually want to measure. “All our domains” is usually too vague. Include the entry page, the transition mechanism, the destination and the event that represents success.
| Journey | Configuration prerequisite | Controlled success case |
|---|---|---|
| Marketing site → application | Both teams can implement the same measurement design | Match entry and application IDs, then verify signup |
| Store → hosted checkout | Checkout supports the required tag and parameters | Follow one order through checkout to payment |
| Content site → booking site | Redirects and forms preserve the handoff | Submit a booking and trace its confirmation |
| Site → untaggable payment provider → site | Measure the return and assess unwanted referrals | Check original-site identity and the confirmed payment on return |
| One subdomain → another | Check shared cookie settings and actual identifiers | Compare IDs across the real navigation path |
First define the business outcomes you will mark as key events. For a SaaS journey, the GA4 site and app setup guide helps place registration, activation and payment. A tracking implementation should specify the expected identifiers and confirmed outcome at each boundary.
Subdomains deserve a check too. Google recommends cross-domain tracking for subdomains and warns that a visit moving between subdomains with different cookie domains can show up as a self-referral. Consistent cookie domains matter. Do not assume that two hosts sharing a brand name share the same browser identity. GA4 cross-domain setup
Cross-domain measurement also does not join different people, browsers or devices. A signed-in customer may use a phone and a laptop; that is a separate identity design problem. This guide tests one browser moving through one permitted journey.
What must be set up before cross-domain tracking works?
To track users across multiple domains without splitting their sessions, every participating domain needs the same G- tag ID from the same web stream, and the person configuring it needs Editor access or above. Analytics sets its first-party user and session ID cookies with consent.
In GA4, open Admin → Data streams → Web → your stream → Configure tag settings → Configure your domains. Accept relevant detected recommendations or choose Add condition, select a match type and enter each domain. Save the changes. Conditions use OR logic. Google's configuration instructions
Before changing the list, record the existing configuration and identify the person who owns each domain. Test that each destination loads the intended tag once. If one page sends to a different stream, adding its domain to a list does not repair the measurement design.
Use precise matching. A broad condition can include hosts that were never intended to participate. Your test inventory should name the real hostnames, including regional checkout routes and production application hosts. Preview and staging environments should have an explicit measurement policy rather than quietly entering production reports.
How do you set up cross-domain tracking with Google Tag Manager?
Set GA4 domains in Admin and let the Google tag in GTM read that list. A manual Google-tag linker object overrides its domain list, so include all required domains in that object. Check existing variables before adding settings. Google's linker configuration reference
Google Ads and Floodlight have a separate implementation question. Where a Conversion Linker is needed, create it under Tags → New, use the appropriate page trigger, enable linking across domains and populate Auto Link Domains. All Pages is the usual trigger. If a Google tag or Destination tag for the destination already loads on every page, Google says a separate Conversion Linker is unnecessary. Conversion Linker instructions
| Conversion Linker option | When it matters | Evidence to inspect |
|---|---|---|
| Enable linking across domains | Enables the cross-domain handoff | Fresh outgoing navigation is decorated |
| Auto Link Domains | Names outgoing destinations | Actual hostname matches the intended destination |
| Decorate Forms | Needed for supported cross-domain form submissions | Submitted form carries the handoff |
| URL Position: Query Parameter | Required for Decorate Forms | Redirects preserve the decorated query |
| URL Position: Fragment | An alternative for compatible non-form journeys | Destination adopts IDs on that specific route |
For destinations without auto-linking, Google documents Accept incoming linker parameters. GTM offers no GA4 decorate_forms control; custom GA4 form handling needs the developer implementation. Linker parameter reference
The 12 October 2026 GTM release introduced direct Google destinations and centralized container settings. For containers using Destination tags, cross-domain linking is managed in the container's Settings tab. Google's public instructions establish that location but do not name a deeper cross-domain field in the new interface. Use the settings exposed by your upgraded container and verify the resulting handoff. GTM release notes, container optimization guide
Treat an optimization and a tracking repair as separate changes where possible. If you simultaneously migrate the container, change consent and replace the domain list, a failed result has several plausible causes. Record one change, repeat the same test and keep a reversible version. The GTM implementation mistakes guide covers competing tag paths and timing issues.
How do you prove the destination adopted the right identifiers?
Compare source and destination client/session IDs, then inspect the business event's identity. The _gl parameter transports those identifiers; its presence alone does not prove that the destination or conversion adopted them.
Check four stages in order:
Read diagram as text
- Outgoing link decorated to Parameter survives navigation.
- Parameter survives navigation to Destination adopts identifiers.
- Destination adopts identifiers to Business event uses expected identity
Keep a small evidence record for each attempt: test time, browser, consent state, source URL, destination URL, client ID, session ID and observed event. Use synthetic test data where possible, and avoid including full customer URLs or identifiers in a publicly shared ticket.
On a page where gtag is loaded and the relevant tag has initialized, this read-only diagnostic requests the browser and session IDs. Replace the measurement ID with your stream's actual ID:
const measurementId = 'G-REPLACE_ME';
const fields = ['client_id', 'session_id'];
fields.forEach((field) => {
gtag('get', measurementId, field, (value) => {
console.log({
host: location.hostname,
field,
value: value ?? 'unavailable'
});
});
});The supported get API invokes a callback with the requested field, or undefined when unset. If no callback arrives, first investigate tag loading and initialization. If gtag is unavailable, use your supported GTM diagnostic path rather than creating a second tag just to run the snippet. Google tag API reference
This code does not send a purchase or alter your configuration. It also does not prove that every later event carries those values. Inspect the event requests or debug output for the business action separately.
Which checkpoints should a three-domain acceptance test verify?
Check marketing entry, application landing, checkout and the confirmed transaction within one controlled browser session. Consider this illustrative flow:
- A visitor arrives at
learn.example.comfrom a controlled test campaign. - They click a trial link to
example-app.net. - They choose a paid plan and move to
example-checkout.org. - A confirmed transaction produces the agreed purchase or subscription event.
Complete it in one browser, with the intended consent state and without an inactivity timeout. Record actual IDs; the labels below are placeholders for expected equality.
| Checkpoint | Client ID | Session ID | Expected observation |
|---|---|---|---|
| Marketing entry | client_A | session_A | Controlled campaign entry collected |
| Application landing | client_A | session_A | Same identity after the first handoff |
| Checkout landing | client_A | session_A | Same identity after the second handoff |
| Confirmed transaction | client_A | session_A | One valid business event |
If the application shows client_B, investigate the first handoff. If the application matches but checkout changes identity, investigate the second. If both IDs match but the purchase fires twice, the linker is not the explanation for that duplication.
Test the event semantics too. A checkout page view is not a confirmed payment. A button click may precede a failed transaction. Match the event to the underlying business result, then mark the verified outcome as a key event.
Run positive and negative cases in separate, fresh browser contexts with no existing analytics cookies on any participating domain. Reusing the successful browser can preserve destination IDs that were already linked, so removing a domain alone does not create a valid negative control.
For the negative case, disable the relevant domain/linker configuration in a controlled environment. Start a new isolated context, apply the same consent choice, navigate from a fresh source click and confirm that _gl is absent. Compare the independently created destination IDs with the source. If they still match, investigate another active linking mechanism or contamination of the test state. Restore the configuration and run the positive case in another clean context. This is a test-design recommendation derived from cookie persistence, not a claim of a live test performed here.
Keep session timing separate from linker timing
Linker parameters expire after two minutes. Test with a fresh click; an old copied URL can produce a misleading failure. Google's linker timing guidance
GA4's default session inactivity timeout is 30 minutes, and the web-stream settings can change that timeout. A new session after a long pause may be expected. Record the actual timeout and elapsed time before asserting that session continuity failed. GA4 session documentation
How do you find the first failing transition?
When GA4 cross-domain tracking is not working, use the browser's network log to inspect navigation, especially when redirects happen too quickly to see in the address bar. Google identifies redirect stripping and scripts that interrupt click handling as common causes. Cross-domain troubleshooting
| Observation | Next check | Evidence that distinguishes the cause |
|---|---|---|
| Outgoing URL has no linker | Domain match and navigation handler | A normal link works but a scripted button does not |
First request has _gl; final URL does not | Redirect chain | The exact response that removed the parameter |
| Parameter arrives; client ID changes | Destination tag and incoming handling | Stream ID, consent state and first destination request |
| Client ID matches; session ID changes | Timing and session configuration | Elapsed inactivity versus configured timeout |
| IDs match; business event missing | Event implementation | Confirmed action exists but no corresponding event |
| Event appears twice | Duplicate tags or repeated action | Two requests for the same test transaction |
Imagine checkout redirects from a generic hostname to a regional hostname. The first destination receives _gl, but a redirect reconstructs the URL without query parameters. Fixing the source tag will not help. The evidence should identify the redirect that discards the parameter and the final page that needs to receive it. If the missing value is an advertising identifier on Safari, the browser-specific click-ID checks also inspect the request before any redirect or script runs.
Test customer behavior, not just your easiest link. Include a form submission, a sign-in redirect and a payment return where those exist. Also verify that pages and downloads still function when parameters are present. Tracking that breaks checkout has failed even if its identifiers look correct.
How should you test consent changes?
Run at least three separate scenarios: consent granted before navigation, consent denied, and consent changed during the journey. Record what the consent manager sends and what each destination receives. The goal is to verify the permitted behavior, not force identifiers to persist after a refusal.
A common operational gap is ownership. The marketing site may have one consent implementation while the app has another. A correct tag on each page does not establish that they interpret the visitor's choice consistently. Define which team owns that transition and test it after consent-manager releases. Our Consent Mode guide covers the wider implementation.
Do not interpret the absence of persistent identifiers under denied consent as automatic evidence of broken cross-domain linking. Compare like-for-like scenarios and keep consented identity tests separate from privacy-state tests.
Why is referral exclusion a different fix?
An unwanted-referral rule tells Analytics not to treat a matching referrer as a new referral source. It does not transport the original browser or session IDs. Google gives third-party payment processors as a use case for unwanted referrals. Unwanted referral documentation
If you cannot tag a payment provider, adding it to a cross-domain list does not give its pages your tag. Instead, inspect the return journey, original site identity and purchase collection. Confirm whether a referral rule is appropriate, then test the result.
A falling self-referral count is encouraging, but it is not proof of complete repair. You could remove the visible symptom while leaving source and medium as (not set) or traffic as Unassigned. Judge the change against the complete journey fixture, not one chart.
What changes after the setup works?
Once the handoff is reliable, connect the rest of the customer journey through explicit event definitions and identifiers. Decide which events represent intent, successful registration, product value and confirmed revenue. Cross-domain continuity helps connect those steps; it does not make them equivalent.
For an application that changes routes without full page loads, validate single-page app page views after the handoff. Confirm that the application emits the right page location and does not duplicate the initial landing view.
Keep a regression test for each important transition. Repeat it after changes to routing, checkout, consent, tags or domains. Record the release date so a future analyst can explain why the report changed. Historical sessions generally cannot be repaired by today's linker configuration, so compare new traffic with the documented baseline.
What should pass before releasing the cross-domain setup?
Release when the intended handoffs preserve permitted identity, the business event is correct and a clean-state negative control detects a deliberately broken link:
Checklist
- Inventory the actual hosts, redirects, forms and final business action.
- Confirm the intended stream and tag ID on every participating page.
- Check whether a manual linker object overrides the Admin list.
- Identify the applicable GTM configuration path for the container.
- Follow fresh links and record identifiers at every boundary.
- Test the final business event for both presence and duplication.
- Run granted, denied and changed-consent scenarios separately.
- Verify regional redirects, payment returns and downloads still work.
- Save the test evidence, release version and responsible owner.
If the evidence breaks between the site, app and checkout, get the $99 martech audit or a tracking implementation scope. A useful scope names the failing journeys and the acceptance tests, not just “fix GA4.”
Keep reading
Browse all Tracking & Attribution guides
Tracking & AttributionGA4 setup for SaaS and apps: the events and settings that matter
Set up GA4 for a SaaS acquisition journey. Define events, test consent and cross-domain tracking, choose Ads goals and verify revenue, identity and export.
Jafrin Akter AloLast updated 14 min read
Tracking & AttributionGA4 Bounce Rate Looks Wrong? 5 Checks Before You Change the Page
Diagnose unexpected GA4 bounce rates. Check duplicate views, key events, engagement timers, session scope and weighted averages before changing your page.
Jafrin Akter AloLast updated 10 min read
Tracking & AttributionGoogle Analytics API: Reports, Configuration and Event Collection
Choose the GA4 Data API, Admin API or Measurement Protocol. Run a report, configure access, paginate results and plan quotas with practical examples.
Jafrin Akter AloLast updated 10 min read
Analytics & tracking
See the implementation scope, deliverables and acceptance checks.
Questions people ask
How many domains can I add to GA4 cross-domain measurement?
Google permits up to 100 conditions per web stream, combined with OR logic. This is a condition limit, not a reason to add every domain you own. Keep the list tied to the journeys you have tested. Record the hostnames each condition is intended to match, especially when checkout uses regional domains.
What evidence should we request when a checkout vendor changes its redirect?
Request the old and new navigation paths, the release time and a controlled order that can be traced through the changed route. Record the first destination URL, final landing URL and identifiers used by the confirmation event. Share synthetic test evidence with the vendor so both teams investigate the same transition instead of comparing unrelated screenshots.
Does cross-domain tracking join people across devices?
No. This setup handles a browser moving between domains. Cross-device analysis needs a separate, appropriately designed identity strategy. Do not use email addresses in navigation parameters to improvise one. Keep the browser handoff test separate from any authenticated-user analysis, and document which identifiers each report actually uses.
Should I add a payment provider to the domain list?
Only when the payment journey supports the necessary tagging and handoff. For an untaggable provider, assess unwanted referrals and validate the return to your site. A domain-list entry cannot instrument another company's pages. Confirm the integration capability with the checkout owner before changing production settings or interpreting a lower referral count as success.
Why did outbound click events disappear after setup?
Enhanced measurement does not emit outbound-click events for links to domains configured for cross-domain measurement. If the transition itself matters to your funnel, define and validate an appropriate dedicated event. Google's outbound-click guidance Keep its name distinct from the confirmed business outcome, and test that one navigation produces one transition event.
Sources

Written by
Jafrin Akter AloData Engineer and Co-founder at Martechdevs and Growth and Analytics Partners
Jafrin writes practical guides to marketing technology, customer data, analytics and AI workflows. Martechdevs is a Growth and Analytics Partners company.