🛠️ Testing & Diagnostics

How to Test if Your GA4 _gl Cross-Domain Token is Working Correctly

By Dimsquid EngineeringPublished Aug 5, 20268 min read

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:

Valid Decorated URL Structure:
https://checkout.myshopify.com/cart/123?_gl=1*1a2b3c*_ga*MTIzNDU2Nzg5LjE2NzAwMDAwMDA.*_ga_F1TNRJQML7*R1MxLjEu...

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:

  1. Check the value of the _ga cookie on yourbrand.com (e.g., GA1.1.987654321.1670000000).
  2. Click to Shopify checkout and inspect the _ga cookie on checkout.myshopify.com.
Success Condition: Both cookie values match perfectly across domain boundaries!
⚡ Automated Diagnostic

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.

Get GA4 Linker Plugin Free →