📊 GA4 Attribution Guide

Why is GA4 Showing (Direct) / (none) for My Shopify Orders from WordPress?

By Dimsquid EngineeringPublished Aug 4, 20266 min read

You log into Google Analytics 4, check your E-commerce Conversions report, and your heart drops: 80% to 90% of your total Shopify revenue is attributed to (direct) / none or Unassigned.

Meanwhile, your Facebook Ads Manager, Google Ads account, or Klaviyo email campaigns claim they generated tens of thousands in sales — but GA4 shows $0 ROAS.

If your business runs content, landing pages, or blog posts on WordPress and redirects buyers to a separate Shopify checkout domain, you are experiencing the classic cross-domain session breakage bug.

🚨 The Core Problem in 1 Sentence:

When a user transitions from your WordPress domain (yoursite.com) to your Shopify domain (checkout.yourbrand.com or myshopify.com), Google Analytics loses the user's client ID cookie and starts a brand new session attributed to Direct traffic.

1. Why GA4 Loses Attribution Across Domains

Google Analytics 4 tracks visitors using a first-party cookie named _ga stored on the user's browser. This cookie contains a unique Client ID (e.g. GA1.1.123456789.1670000000).

Due to modern browser security policies (Apple ITP, SameSite cookie restrictions, and cross-site privacy protections), Shopify cannot read the _ga cookie set by WordPress.

When the visitor clicks "Buy Now" or submits an "Add to Cart" form on WordPress:

  1. The browser navigates to the external Shopify checkout URL.
  2. Shopify loads Google Analytics 4, but finds no existing _ga cookie for the Shopify domain.
  3. GA4 generates a brand-new Client ID and creates a new session.
  4. Because the HTTP Referrer is either stripped or marked as an external redirect, GA4 categorizes the conversion as (direct) / none.

2. The Solution: How the _gl Cross-Domain Token Works

To solve cross-domain cookie isolation, Google created the official Google Linker parameter (_gl).

Instead of relying on cross-site cookies, Google Linker appends an encrypted query parameter directly to the destination URL when a user clicks a link:

https://yourstore.myshopify.com/cart/add?id=12345&_gl=1*1a2b3c*ga*MTIzNDU2Nzg5LjE2NzAwMDAwMDA.

The _gl parameter contains the encrypted Client ID and current timestamp. When Shopify receives this URL:

  • GA4 on Shopify extracts the Client ID from the _gl parameter.
  • It matches the incoming user with their existing WordPress session.
  • The entire journey — from the original Meta Ad click or Google organic search to the final Shopify checkout purchase — is stitched into a single continuous session.

3. Common Misconception: The GA4 "Configure Domains" Myth

Many store owners open GA4 Admin, navigate to Data Streams → Configure Tag Settings → Configure Your Domains, and enter their Shopify domain, believing the problem is fixed.

⚠️ Why GA4 Domain Configuration Isn't Enough:

Adding domains inside GA4 settings only tells Google Analytics that it is allowed to accept _gl parameters. It does NOT automatically attach _gl query strings to your WordPress anchor links, HTML form buttons, or slide-out AJAX carts!

4. Why Manual GTM Setups Keep Breaking

Digital marketers often try to fix link decoration by setting up custom Google Tag Manager (GTM) triggers. While this can work for basic static links, it frequently fails in real-world store environments:

❌ AJAX Cart Drawers

Slide-out carts and popups load dynamically after page load. Standard GTM link listeners miss these elements entirely.

❌ Form Submit Actions

Buy buttons that submit HTML <form> actions require custom form field injection, which breaks GTM anchor tag rules.

5. The Instant Fix: GA4 Linker for Shopify

Rather than spending thousands on custom analytics development or debugging complex GTM containers, GA4 Linker for Shopify automates cross-domain session stitching in under 60 seconds.

Conclusion

Don't let broken cross-domain tracking destroy your ad attribution. By decorating outbound Shopify links with GA4 _gl parameters, you restore complete visibility into your marketing campaigns, ad sets, and true e-commerce ROAS.