How to Know If Your Cross-Domain Tracking Is Actually Working

Cross-domain tracking lets you follow users across separate domains in a single session. Here's how to verify it's set up correctly and spot when it's broken.

10 min read Hammad Sheikh
Tracking & Attribution
10 min read Hammad Sheikh

What Cross-Domain Tracking Does

Cross-domain tracking connects user behavior across multiple domains under one session. Without it, a visitor who lands on example.com, then navigates to shop.example.com, appears as two separate sessions in your analytics. With proper setup, both actions merge into one continuous journey.

This matters when your web presence spans multiple domains: a marketing site on one domain, a product app on another, a checkout flow on a third. You need to see the full path to understand how users move between them and where they drop off.

Check Your Configuration First

Before testing, confirm the basics are in place. Open your Google Analytics 4 property and navigate to Admin (bottom left) > Data Streams. Select the stream for your primary domain.

Scroll down to "More tagging settings" and look for the cross-domain configuration section. You should see a list of domains you've added. If the list is empty or missing domains you expected, configuration is incomplete.

In Google Tag Manager, check your GA4 configuration tag. The linker setting must be enabled, and your cross-domain domains must be listed in the accept_incoming_ib_impersonation_parameter field. If this field is empty or missing, the tag won't recognize incoming cross-domain traffic.

Test with Real Navigation

The simplest test is to walk through your own user flow. Start on your primary domain (for example, example.com). Open your browser's developer tools and go to the Network tab. Filter for collect to see GA4 requests.

Click a link that takes you to your secondary domain (for example, shop.example.com). Watch the Network tab for a new collect request. Look at the request parameters. You should see a _gl parameter (the linker parameter) in the URL of the link you clicked. This parameter carries the session ID across domains.

If the _gl parameter is absent, the linker isn't firing. Check that your GTM tag has linker enabled and that the domains are correctly listed.

Check Session IDs in Analytics

After you've navigated across domains, wait 24–48 hours for data to populate in Google Analytics 4. Then check your real-time report or the Users report.

Go to Reports > User acquisition > Traffic. Filter by your test session or user ID if you've set up user identification. Look at the session timeline. If cross-domain tracking is working, you'll see events from both domains listed under a single session. The session start time should match the first domain visit, and events from the second domain should appear in chronological order afterward.

If events from the second domain appear as a separate session (with a new session start time), cross-domain tracking isn't working. The session ID didn't pass between domains.

Verify the Linker Parameter in URLs

Inspect the actual links between your domains. Right-click a link from domain A to domain B and select "Inspect" or "Inspect Element." Look at the href attribute.

A working cross-domain link should include the _gl parameter at the end of the URL. It looks like this:

https://shop.example.com/products?_gl=1*abc123*_ga*xyz789

The _gl value is a base64-encoded string. If this parameter is missing from links between your domains, GTM's linker setting is off or not applied to those links.

If the parameter is present but sessions still split, the receiving domain may not be configured to accept it. Double-check that both domains are listed in your GA4 Admin settings under cross-domain configuration.

Use GA4 DebugView

Google Analytics 4 includes a DebugView tool for real-time event inspection. In your GA4 property, go to Configure > DebugView.

On your primary domain, add the query parameter ?debug_mode=true to your URL (for example, example.com/?debug_mode=true). This sends your events to DebugView instead of the regular event stream.

Navigate to your secondary domain while DebugView is active. You should see events from both domains appear in DebugView under the same session ID. If the session ID changes between domains, the linker parameter didn't transfer the session correctly.

DebugView also shows you the exact parameters being sent with each event. Look for the session_id field. It should be identical across both domains for the same session.

Check for Common Breakdown Points

If tests show cross-domain tracking isn't working, check these common issues:

  • Linker not enabled in GTM: Open your GA4 configuration tag. Under "More settings" > "Linker", toggle it on. Add all your domains to the "Domains to allow" list.
  • Domains not matching exactly: If your primary domain is www.example.com but you list example.com in GA4, they won't match. Use the exact domain name in both GTM and GA4 Admin settings.
  • Subdomain vs. root domain confusion: example.com and shop.example.com are different domains. Both must be added to cross-domain configuration. A shared cookie domain won't work here; you need the linker.
  • JavaScript disabled or blocked: GTM's linker uses JavaScript to add the _gl parameter to links. If your site blocks scripts or the user has JavaScript disabled, the parameter won't be added.
  • Redirect chains: If a link redirects through a third domain before reaching your destination, the _gl parameter may be lost. Minimize redirects between tracked domains.
  • Client-side navigation: If your site uses single-page app navigation (React, Vue) without full page reloads, the linker may not trigger. Check that GTM's linker is configured for your framework.

Monitor Cross-Domain Traffic Over Time

Once you've confirmed cross-domain tracking works, set up a regular check. In GA4, create a custom report that shows sessions by source domain. Go to Reports > Customization > Custom Reports.

Add "source domain" as a dimension and "sessions" as a metric. This report shows you how many sessions start on each domain. If you see a sudden drop in cross-domain sessions, it may indicate a configuration change or broken link.

Set up an alert for significant drops in cross-domain traffic. In GA4, go to Admin > Alerts and create a threshold alert for "sessions" from your secondary domain. This flags issues before they affect reporting for days.

Reality Check: When Cross-Domain Tracking Breaks

Cross-domain tracking is fragile. A single update to GTM, a change in domain structure, or a third-party script can break it. Test your setup quarterly, not just at launch. Use DebugView before publishing major changes to confirm the linker still fires.

If you're using UTM parameters for campaign tracking, remember that cross-domain links may override them. The _gl parameter carries the session ID, but UTM values on the destination link take precedence. Plan your link structure accordingly.

If you've added new domains or subdomains, update your GA4 Admin settings and GTM configuration immediately. Waiting for data to populate before testing leaves you blind to failures for 24+ hours.


FAQs

Do I need cross-domain tracking if all my domains are subdomains?

No. Subdomains of the same root domain (example.com and shop.example.com) can share a cookie if you set the cookie domain to ".example.com". Cross-domain tracking is for separate root domains.

Will cross-domain tracking work if a user clears their cookies between visits?

No. Cross-domain tracking relies on the session ID stored in a cookie. If the user clears cookies, the session breaks and a new one starts on the next domain.

Can I use cross-domain tracking across different Google Analytics properties?

No. Cross-domain tracking works within a single GA4 property. If you have separate properties for each domain, you'll need a different approach (like server-side session tracking or a shared database).

How do I test cross-domain tracking on localhost?

Localhost testing is unreliable because cookies and the linker parameter behave differently on local environments. Test on a staging or production environment with real domains.


People Also Ask

How do I set up cross-domain tracking in Google Analytics 4?

Add all your domains to GA4 Admin > Data Streams > More tagging settings, then enable the linker in your Google Tag Manager GA4 configuration tag and list the same domains.

What's the difference between cross-domain tracking and UTM parameters?

Cross-domain tracking carries the session ID across domains so you see one continuous journey. UTM parameters label traffic source but don't connect sessions. Both can work together.

Why do my cross-domain sessions show as direct traffic?

If the linker parameter isn't being passed correctly, the second domain sees the visit as direct instead of a referral. Check that the _gl parameter is in the URL and that both domains are configured in GA4.

Can I cross-domain track users who go through a payment processor?

Not directly. Payment processors (Stripe, PayPal) are external domains that won't have your GA4 tag. You can use server-side tracking to log the return to your domain, or rely on the payment processor's conversion pixels.

How long does the cross-domain session last?

By default, a GA4 session lasts 30 minutes of inactivity. If a user is inactive for 30 minutes between domain visits, the session resets and a new one starts on the next domain.

What if my secondary domain is on a different subdomain but same root?

Set your GA4 cookie domain to the root domain (example.com). Both subdomains will share the same session cookie, and you don't need the linker parameter.

Can I see which domain a user came from before cross-domain tracking?

Yes. GA4 records the source and medium of the first session. Use the "Session source / medium" dimension in reports to see where sessions started, even after cross-domain navigation.

How do I troubleshoot if the _gl parameter appears but sessions still split?

The _gl parameter is being added but not recognized on the receiving domain. Check that the receiving domain is listed in your GA4 Admin cross-domain configuration, and that the GA4 tag is installed on that domain.

Should I add the _gl parameter to all links or just cross-domain links?

Only links that go to a different domain need the parameter. Links within the same domain don't need it because the session cookie is already shared.

If this post is wrong, outdated, or you would take a different path

I write from work I have done on real sites. Search products change, and a step that was right when I published can go stale. I can also be wrong about the method.

If you disagree with the approach, the facts, or the outcome, I want the detail. Tell me what is off, what you would do instead, and where you saw it. I use that to correct the post so the next reader is not stuck.

This is not a comment thread. Use Contact me so the note is tied to this post and I can reply.

Share this post

Straight answers

Questions I hear a lot

How do you differ from a traditional agency?

You work with me, not a rotating cast. I audit, build, and train your team. Agencies often keep control and charge forever to run what you could own in-house.

What size of marketing budget makes sense for your services?

Honestly, you need enough marketing activity to make fixes worthwhile. Still very early stage? A course or specialist vendor may fit better. Already running a full in-house team? You probably want a full-time CMO, not me part-time.

Do you work with specific industries?

Yes: logistics, real estate, pro services, SaaS, local trades. Places where online leads hit the P&L fast. I skip healthcare and finance; compliance slows the work down.

What does a typical engagement look like?

Engagements start with a two-week audit of analytics, ads, SEO, and CRM. Then a 90-day plan focused on attribution, conversion, and what's leaking spend. Hands-on build and training along the way; at the end your team runs it.

How do I know if I need a digital marketing consultant versus hiring full-time?

If revenue is growing faster than you can hire marketing, fractional support fills the gap. Interim CMO work until you're ready for a full-time exec. Hiring help is available when you get there.

What happens after the engagement ends?

You keep logins, docs, and dashboards. Engagements are built so your team can maintain and troubleshoot. Some clients book a quarterly check-in; that's optional.

Drop Me A Message

Let’s start building the high-performance growth engine your brand deserves.

Ready to transform your digital presence into a high-performance engine? Whether you have a specific project in mind or need a comprehensive strategic consultation, I am here to bridge the gap between your current standing and your ultimate market goals. Reach out today to discuss how my specialized infrastructure and AI-driven strategies can scale your business. Fill out the form, and let’s start turning your vision into a measurable reality.

Get Growth Plan Page

Drop Me A Message

HAMMAD SHEIKH

Copyright © 2026 HAMMAD SHEIKH. All Rights Reserved