- Primary leak: Missing or mismatched ga_session_id on Measurement Protocol server purchases forces GA4 to bucket revenue into 'Unassigned' or '(not set)'.
- Wallet hijacking: Shop Pay (shop.app), PayPal, Klarna, and Affirm overwrite paid search/social credit unless listed under GA4 Unwanted Referrals.
- Sandbox isolation: Shopify Checkout Extensibility runs Custom Pixels in a strict sandbox where document.cookie cannot read storefront cookies unless passed via cart attributes or Customer Events.
- Fast check: Run our free Live Funnel Leak Inspector (/tools/funnel-inspector/) or book a $1,000 Forensic Audit to trace 10 real paid orders.
Root-Cause & Verification Diagnostic Table
Match the exact symptom observed in your ad account or CRM against the verification check and verified production fix below:
| Observed Symptom | Root Cause | Verification Check | Verified Production Fix |
|---|---|---|---|
| GA4 Traffic Acquisition shows 20%+ purchase revenue under 'Unassigned' | Server-side Elevar / Measurement Protocol purchase missing valid session_id or engagement_time_msec | Query GA4 BigQuery export or DebugView for ga_session_id on purchase vs. begin_checkout |
Capture storefront _ga client_id and _ga_ |
| Paid Google/Meta orders appear attributed to shop.app or paypal.com | Accelerated checkout redirect overwrote session source because domain is missing from Unwanted Referrals | GA4 Admin -> Data Streams -> Configure tag settings -> List unwanted referrals |
Add shop.app, pay.shopify.com, paypal.com, klarna.com, afterpay.com, and affirm.com to GA4 Unwanted Referrals |
| begin_checkout fires in GA4 but purchase count is 15% to 35% lower | Duplicate GA4 Google & YouTube app conflicting with Elevar server-side GA4 or blocked web pixel in sandbox | Compare Shopify net order count vs. GA4 transaction_id distinct count over 14 days |
Run a single GA4 purchase source with deterministic transaction_id and verify webhook coverage for Shop Pay & subscription orders |
| Custom subdomain checkout (checkout.brand.com) splits sessions | Cookie domain misconfigured or cross-domain linker stripped on redirect | Inspect _ga cookie value on storefront vs. checkout domain in DevTools |
Set cookie_domain: 'auto' on root domain and list cross-domain domains in GA4 Stream settings |
Step-by-Step Production Fix Checklist
Execute these steps in order and verify every conversion path in test mode before pushing to live paid traffic:
- Verify GA4 Admin -> Data Streams -> Configure tag settings -> List unwanted referrals includes shop.app, pay.shopify.com, paypal.com, klarna.com, afterpay.com, and affirm.com.
- Audit Shopify cart attributes on a real test order to verify Elevar or your first-party script persists client_id (_ga), session_id (_ga_
), gclid, and utm parameters before checkout starts. - Check GA4 BigQuery or Exploration reports grouped by transaction_id to detect duplicate transaction IDs or missing session_id values on server purchases.
- Disable overlapping GA4 purchase events in Shopify's Google & YouTube app if Elevar or sGTM already owns server-side GA4 delivery.
- Ensure Consent Mode v2 default/update signals are passed into the server GA4 payload so EU/UK consented checkouts are not stripped of session attribution.
- Reconcile 14-day Shopify net orders against GA4 distinct transaction_ids and confirm Unassigned revenue sits below 5%.
Reference Implementation & Verification Pattern
// Storefront script: capture GA4 client_id + session_id into Shopify cart attributes
function parseGaSession(measurementId) {
const suffix = measurementId.replace("G-", "");
const cookie = document.cookie.split("; ").find((c) => c.startsWith("_ga_" + suffix + "="));
if (!cookie) return null;
const parts = cookie.split("=")[1].split(".");
return parts[2] || null; // GS1.1.<session_id>...
}
async function persistGaToCart(measurementId) {
const gaCookie = document.cookie.split("; ").find((c) => c.startsWith("_ga="));
const clientId = gaCookie ? gaCookie.split("=")[1].split(".").slice(-2).join(".") : "";
const sessionId = parseGaSession(measurementId);
if (!clientId) return;
await fetch("/cart/update.js", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ attributes: { _ar_ga_cid: clientId, _ar_ga_sid: sessionId || "" } })
});
}
Want us to trace 10 real paid clicks end-to-end across your live funnel before editing production? Book our $1,000 Forensic Tracking Audit (3 business days, read-only access, 100% credited toward any sprint) or test your landing page right now in the Free Funnel Leak Inspector.
Related Fixes, Tools & Primary Documentation
- Elevar Pricing & Owned sGTM Alternative (2026)
- Shopify Plus Checkout Extensibility Blueprint
- Live Funnel & Click-ID Leak Inspector
- How to Fix Shopify Meta CAPI Duplicate Purchase Events
- How to Fix HubSpot to Google Ads Offline Conversions Showing Zero
- How to Fix Shopify Meta Event Match Quality (EMQ) Below 6.0
- Primary docs: Google Analytics 4 Measurement Protocol User & Session Guidelines
- Primary docs: Shopify Cart Ajax API Attributes Documentation
- Primary docs: Simo Ahava Server-Side Tagging & GA4 Session Attribution Guide