Skip to content
🚀 Find us on Product Hunt

Cross-Domain Tracking for WooCommerce

Quick answer: The wizard's Cross-Domain Tracking checkbox doesn't currently modify your container. To track a visitor across two domains correctly in GA4, add both domains to the GA4 Configuration tag's "Configure your domains" field directly in GTM - this keeps a single session ID as visitors move between them.

Build my container →

Cross-domain tracking matters whenever a customer's journey crosses domains you own - a storefront on one domain and a hosted checkout, payment gateway, or headless frontend on another. Without it, GA4 treats the visitor as two separate sessions and attributes the purchase to a new, direct-traffic session instead of the original marketing source.

Not yet automated here. This wizard checkbox doesn't change the generated container yet. Here's the manual GTM setup, which only takes a couple of minutes.

Manual setup steps

  1. In GTM, open your GA4 Configuration tag.
  2. Under Tag Settings, find "Configure your domains" and add every domain the customer journey spans (e.g. yourstore.com and checkout.yourpaymentprovider.com).
  3. Publish the container, then click any outbound link between the two domains in Preview mode and confirm a _gl linker parameter is appended to the URL.
  4. Complete a full test purchase across both domains and confirm in GA4's real-time report that it registers as one session, not two.

Note this configures the linker parameter inside GTM only - it doesn't change server-side session or cookie behavior on either domain, which is outside what a GTM container alone can control.

Frequently asked questions

Do I need this if my whole store is on one domain?

No - cross-domain tracking only matters when the customer journey genuinely spans more than one domain you control. A single-domain WooCommerce store doesn't need it.

What's the _gl parameter I see appended to links?

That's the linker parameter GA4 uses to pass a client/session identifier between your configured domains, so the second domain recognizes it as the same visit rather than starting a new session.

Does this affect Meta, TikTok, or other platform tags too?

No - the domain linking behavior described here is specific to GA4's native tag settings. Other platforms handle cross-domain identity differently, typically through their own pixel/cookie matching.

Other advanced topics

← All advanced guides

Share with