Google Analytics 4
Keep Google Analytics 4 sessions when visitors move to another country storefront.
When Connect Stores sends a visitor from one domain to another (brand.com to brand.ca), Google Analytics 4 can start a new session on the destination. Source, campaign, and ads data often look like a referral from your own store.
Orbe adds GA4’s linker parameter (_gl) to those redirects so the session can continue. You still need cross-domain measurement enabled in GA4.
What Orbe does
On a hostname change, if the origin storefront has GA4 loaded (gtag and a G- measurement ID), Orbe appends _gl before sending the visitor to the other country storefront.
This covers:
Geolocation popup, when the visitor continues to another domain
Country selector, when the destination is another domain
Automatic redirect on a later visit, when the destination is another domain
Orbe does not add _gl when:
The visitor stays on the same hostname (for example a Markets subfolder such as
/ento/fr)GA4 is not on the page (no
gtag, or only Google AdsAW-tags)Decoration fails or times out. The redirect still happens.
There is nothing to enable in Orbe for this. Stores without GA4, or without cross-domain redirects, are unchanged.
Set up GA4
Orbe only stamps _gl on the outbound URL. Session stitching still needs Google’s cross-domain settings on both hostnames.
Without this GA4 setup, _gl is ignored and sessions still split.
Google’s guide: Set up cross-domain measurement.
How to check
Open a connected storefront that has GA4 loaded.
Use the geolocation popup or country selector to go to another domain.
On the destination URL, look for
_gl=(address bar or DevTools → Network).In GA4 DebugView or Realtime, the destination hit should keep the original session and source, not a referral from your origin hostname.
If _gl is missing:
Confirm it was a domain change, not a subfolder on the same hostname.
Confirm
gtagand aG-ID load on the origin page before the visitor clicks through.If you load GA4 only through GTM, use the custom event below.
Custom GTM setups
Load this script before the visitor is sent to the other storefront (theme custom JS, Orbe custom JS, or GTM). Listening after the click is too late.
The event fires on every Orbe navigation. Native _gl decoration still runs afterward if the hostname changed and _gl is not already on the URL.
Use event.detail.decorate when GTM or another tag needs to change the destination URL asynchronously. Return a URL string.
FAQs
Last updated
Was this helpful?

