How to Test if Your GA4 _gl Cross-Domain Token is Working Correctly
Once you have configured cross-domain tracking between your WordPress site and your Shopify checkout, you must verify that Google Analytics 4 is successfully passing session tokens. Here are the 3 reliable methods to test your _gl cross-domain setup in Chrome DevTools and GA4 DebugView.
Method 1: Inspect the Destination Checkout URL
Open an Incognito browser window, visit your WordPress landing page with test parameters (yourbrand.com/?utm_source=test), and click your "Buy Now" button. Inspect the destination URL on Shopify:
If the _gl query parameter is present and starts with 1*..., GA4 has successfully appended the encrypted session token.
Method 2: Compare Client IDs in Chrome DevTools Application Tab
Open Chrome DevTools (F12) and navigate to Application ➔ Cookies:
- Check the value of the
_gacookie onyourbrand.com(e.g.,GA1.1.987654321.1670000000). - Click to Shopify checkout and inspect the
_gacookie oncheckout.myshopify.com.
Method 3: GA4 Linker Attribution Health Scanner
Instead of inspecting cookies manually, GA4 Linker includes a live diagnostic scanner inside WordPress Admin Settings that checks active _ga, _fbp, and target domains in real-time.
