Fix GA4 cross-domain tracking: stop self-referrals between your site, app, and checkout
Learn when GA4 cross-domain tracking is necessary, how to set it up correctly, and how to fix self-referrals that break attribution across your site, app, or checkout flow.
If your marketing site lives on one domain, your app lives on another, and checkout happens somewhere else, GA4 can split a single user journey into multiple sessions.
That usually shows up as messy attribution, sudden direct traffic, or referrals from domains you own or control.
This guide explains when cross-domain tracking matters, how to set it up in GA4, and how to debug it when your reports still look wrong.
What GA4 cross-domain tracking actually does
GA4 uses first-party cookies to recognize users and sessions. That works well on one domain, but it gets harder when a user moves between separate domains during the same journey.
For example:
www.yoursite.comfor marketing pagesapp.yoursite.comordashboard.yoursite.comfor the productcheckout.partner.comfor payments
Without cross-domain measurement, GA4 may treat those transitions as new sessions or even new users. Google documents that cross-domain measurement passes identifiers between configured domains using the _gl URL parameter so Analytics can keep the journey together.
When you need it
You should care about cross-domain tracking if a normal conversion path spans more than one domain or subdomain.
Common examples:
- A SaaS site with a marketing website and a separate app domain
- A store that sends users to a third-party checkout and then back
- A company with content on one root domain and the main site on another
- A setup where login, signup, or account flows happen outside the main site
Google also recommends checking subdomains carefully. If different subdomains are using different cookie-domain behavior or inconsistent tagging, self-referrals can still appear.
Signs your setup is broken
You usually notice the problem in reports before you notice it in implementation.
Look for patterns like:
- Your own domain showing up as a referral source
- A checkout domain appearing as a top referrer
- Direct traffic increasing right after users move between domains
- Sessions restarting in the middle of a normal funnel
- Conversions being credited to the wrong source or medium
If a user clicks a paid ad, lands on your site, signs up in your app, and finishes on checkout, GA4 should not make that look like three unrelated visits.
Cross-domain setup in GA4
If all the relevant domains belong to the same user journey, keep them in the same GA4 property and web data stream. Google recommends a single web stream for journeys that span domains, then configuring cross-domain measurement on that stream.
Step 1: Confirm every important page is tagged
Before you change settings, make sure the GA4 tag is installed everywhere the user can land during the journey.
That includes:
- Marketing pages
- Signup pages
- Product or app pages
- Hosted checkout return pages
If one domain is missing the tag entirely, cross-domain settings alone will not fix the reporting.
Step 2: Add your domains in cross-domain measurement
In GA4:
- Go to Admin.
- Open Data streams.
- Choose your Web stream.
- Open Configure tag settings.
- Open Configure your domains.
- Add the domains that belong to the same journey.
GA4 uses those rules to decorate links or forms between those domains with the _gl parameter so session identity can carry across.
Step 3: Check third-party steps separately
Cross-domain measurement helps when you control or can properly measure both sides of the journey. It does not automatically solve every third-party flow.
For payment providers or other external tools, you may also need to configure unwanted referrals so GA4 does not treat the return visit as a fresh referral source.
Google notes that configured cross-domain traffic is not counted as a new referrer, but third-party services often still need referral exclusion rules.
The most common reasons self-referrals still happen
It is common to configure domains once, then assume the job is done. In practice, one of these issues is usually still causing the mess.
1. Not every domain is actually tagged
If the user moves to a domain that does not send GA4 events, the journey breaks there.
This is especially common when:
- The marketing site is tagged but the app is not
- A template or microsite was missed
- Only some checkout pages are instrumented
2. The user is not moving through a decorated link or form
Google's cross-domain setup relies on the linker parameter being passed during navigation. If the handoff is happening through a custom script, redirect, or unusual routing pattern, the _gl parameter may not survive the trip.
Check whether the destination URL briefly contains _gl during the transition. If it never appears, the linker may not be applied.
3. Redirects strip the linker parameter
Even when the initial link is correct, a redirect can remove query parameters before the next page loads.
This often happens with:
- URL shorteners
- Vanity domains
- Middleware redirects
- Checkout return URLs
If _gl disappears in the redirect chain, GA4 may start a new session on the next domain.
4. Cookie-domain settings are inconsistent across subdomains
For subdomains, Google specifically calls out cookie-domain configuration as a source of self-referrals. If one part of the site behaves like it is on a separate cookie scope, GA4 can lose continuity even though the domains look related to you.
5. Referral exclusion is being used as a bandage
Referral exclusion is useful, but it is not the same thing as correct cross-domain tracking.
If you exclude a domain without preserving session identity, you can hide a referral source while still breaking attribution underneath. That usually leads to more direct traffic instead of cleaner data.
How to test whether cross-domain tracking works
Do not trust the settings screen alone. Run a real journey from first click to conversion.
1. Start with a clean test session
Use an incognito window or a clean browser profile. Visit the same way a real user would, ideally from a tagged campaign URL if attribution is part of the problem.
2. Watch the handoff between domains
As you move from one domain to the next:
- Check whether
_glappears in the URL during navigation - Confirm the destination page loads with GA4 installed
- Watch for redirects that remove parameters
You do not need _gl to remain visible forever, but it should be present at the moment GA4 passes identity across domains.
3. Use Tag Assistant and DebugView
Tag Assistant helps confirm that the tag fires on each domain involved in the journey.
DebugView helps you verify that events arrive in the correct property and in the order you expect.
Use both to answer:
- Did the page view fire on each domain?
- Did the user stay in one continuous journey?
- Did the right property receive the events?
4. Check reports after processing
Once test traffic has had time to process, check whether:
- Your own domains are no longer showing as referrals
- The original source and medium survive through conversion
- Session counts look more realistic
If you fixed self-referrals but source attribution is still strange, the next place to look is UTMs, redirect behavior, or consent timing.
A practical fix order
If your data is messy, work in this order:
- Verify that every domain in the journey is tagged.
- Configure cross-domain measurement in the same GA4 web stream.
- Test whether
_glis passed between domains. - Fix redirects that drop query parameters.
- Add unwanted referral exclusions only where they are genuinely needed.
- Re-test the full journey.
This sequence is faster than changing three settings at once and hoping the charts improve tomorrow.
What "good" looks like after the fix
When cross-domain tracking is working, you should see one cleaner journey instead of fragmented traffic.
That usually means:
- Fewer self-referrals
- Less unexplained direct traffic
- More stable source and medium reporting
- Conversion paths that make sense
And once the data is clean, your dashboard becomes much easier to trust.
If you want a simpler way to read that cleaned-up traffic data, BetterGA gives you one clear view of sessions, top pages, traffic sources, and countries without forcing you back through GA4's report maze.
Keep the setup simple
Use BetterGA to check your numbers without fighting GA4.
Once your tracking is live, BetterGA gives you a cleaner view of your traffic, top pages, and growth trends without the usual Google Analytics clutter.