---
title: "How to Know If Your Cross-Domain Tracking Is Actually Working"
canonical_url: "https://hammadshk.com/blog/how-to-know-if-your-cross-domain-tracking-is-actually-working"
type: "blog_post"
summary: "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."
published_at: "2026-11-27"
updated_at: "2026-11-27"
author: "Hammad Sheikh"
category: "Tracking & Attribution"
---

# 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.

- Category: Tracking & Attribution

## Article

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
----

**Q: Do I need cross-domain tracking if all my domains are subdomains?** A: 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.

**Q: Will cross-domain tracking work if a user clears their cookies between visits?** A: 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.

**Q: Can I use cross-domain tracking across different Google Analytics properties?** A: 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).

**Q: How do I test cross-domain tracking on localhost?** A: 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
---------------

**Q: How do I set up cross-domain tracking in Google Analytics 4?** A: 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.

**Q: What's the difference between cross-domain tracking and UTM parameters?** A: 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.

**Q: Why do my cross-domain sessions show as direct traffic?** A: 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.

**Q: Can I cross-domain track users who go through a payment processor?** A: 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.

**Q: How long does the cross-domain session last?** A: 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.

**Q: What if my secondary domain is on a different subdomain but same root?** A: 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.

**Q: Can I see which domain a user came from before cross-domain tracking?** A: 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.

**Q: How do I troubleshoot if the \_gl parameter appears but sessions still split?** A: 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.

**Q: Should I add the \_gl parameter to all links or just cross-domain links?** A: 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.
