Tracking
TrackingShopify

How to Fix Missing Purchases in Google Analytics for Your Shopify Store

If Shopify shows 50 orders but Google Analytics shows 31, your purchase event is broken. Here's how to diagnose exactly what's wrong and fix it step by step.

Hassan Muhammad Younas··8 min read

Shopify says you had 50 orders yesterday. Google Analytics says 31. The revenue gap is even larger. You've been running your marketing decisions on numbers that are 40% understated.

This is one of the most common — and most damaging — problems in ecommerce analytics. When your purchase tracking is broken, you can't trust your conversion rate, your channel attribution, or your ROAS. Everything downstream of that purchase event becomes unreliable.

Here's how to diagnose the exact cause and fix it.


Why Purchases Go Missing in Google Analytics

Cause 1: Payment Gateway Redirects

The most common culprit. When a customer pays via PayPal, Afterpay, Klarna, Sezzle, or any other off-site payment method, the flow looks like this:

  1. Customer clicks "Complete Order" on your checkout
  2. Redirected to PayPal/Klarna/etc.
  3. Pays on the third-party site
  4. Redirected back to your order confirmation page

If your Google Analytics purchase event fires when the confirmation page loads, but the redirect back from PayPal drops the session (which happens in some browser configurations and with strict privacy settings), Google Analytics never sees the confirmation page load — and never fires the purchase event.

Fix: Use Shopify's native Google Analytics integration via the Shopify admin (Online Store → Preferences → Google Analytics). The native integration fires purchase events from within Shopify's own checkout infrastructure, which handles payment redirects properly. Avoid third-party apps or manually embedded scripts for this.

Cause 2: Page Closed Before Confirmation Loads

A surprisingly large number of customers close their browser, switch apps, or have connectivity issues in the seconds between clicking "Complete Order" and the confirmation page fully loading. In these cases, the order exists in Shopify (payment cleared), but the confirmation page never loads in the browser — so the purchase event never fires.

This alone typically accounts for a 3–8% gap between Shopify and Google Analytics purchase counts.

Fix: Server-side tracking. Instead of relying on a browser-side tag to fire the purchase event, use the Google Analytics Measurement Protocol to send purchase data directly from Shopify's servers when an order is confirmed. This fires regardless of what the customer's browser does after checkout.

Cause 3: Ad Blockers and Browser Privacy Restrictions

Safari's Intelligent Tracking Prevention, Firefox Enhanced Tracking Protection, and browser extensions like uBlock Origin block Google Analytics from loading. Depending on your audience's demographics and the devices they use, this can affect 15–35% of your traffic.

There's no browser-side fix for this. The only real solution is server-side tracking (Measurement Protocol), which sends data from your server to Google Analytics, completely bypassing browser-level blocking.

Cause 4: Duplicate Event Prevention Dropping Purchases

Google Analytics deduplicates purchase events using the transaction_id parameter. If two purchase events are sent with the same transaction_id, Google Analytics keeps the first and discards the second.

This works as intended — unless your transaction_id is always null, undefined, or an empty string. In that case, Google Analytics treats every purchase as a duplicate of every other purchase and may aggressively drop events.

Diagnosis: Open Google Analytics → Configure → DebugView → complete a test purchase. Look at the purchase event and check whether transaction_id is populated with an actual order ID. If it's null or empty, fix your tag configuration.

Cause 5: Tag Firing Before Shopify Populates Order Data

On your Shopify order confirmation page (the "Thank You" page), Google Analytics fires when the page loads. But Shopify sometimes populates order data (order ID, revenue, items) via JavaScript after the page loads — meaning your Google Analytics tag fires before the order data is available.

The result: a purchase event fires, but transaction_id is empty and value is 0.00. Google Analytics shows a purchase with zero revenue, which may or may not be counted depending on your configuration.

Fix: Add a trigger delay or use a DOM-ready trigger in Google Tag Manager to ensure the purchase event fires only after Shopify has populated order variables on the page.


How to Diagnose Your Specific Problem

Step 1: Use Google Analytics DebugView

  1. Open your Shopify store in Chrome
  2. Install the Google Analytics Debugger extension (free)
  3. Enable debugging mode
  4. Place a test order using a test payment method
  5. In Google Analytics, go to Configure → DebugView
  6. Watch for the purchase event to appear in real time

If the purchase event appears: check that transaction_id has a real value, value has the correct order total, currency is set, and items array is populated. If any of these are missing, that's your problem.

If the purchase event doesn't appear at all: the script isn't firing. This points to Cause 1 (payment redirect), Cause 2 (page closed), or Cause 3 (ad blocker during testing — temporarily disable any extensions).

Step 2: Compare Time-Period Discrepancy Rates

Pull 90 days of order data from Shopify. Pull the same date range from Google Analytics. Calculate the gap: (Shopify orders - Google Analytics purchases) / Shopify orders.

  • Gap of 5–12%: Normal for a well-configured setup. Ad blockers and occasional page-close events.
  • Gap of 12–30%: Something is misconfigured. Start with DebugView diagnosis.
  • Gap above 30%: A fundamental setup problem — likely payment redirect tracking failure or wrong integration method.

Step 3: Check for Duplicate Events Going the Other Way

If Google Analytics is showing more purchases than Shopify, you have duplicate events firing. Check your Google Tag Manager triggers — you may have the purchase event firing twice on the confirmation page, or firing on the cart/checkout pages as well.


The Fix Checklist

Work through this in order:

  • Switch to Shopify's native Google Analytics integration (not a third-party plugin or manual script)
  • Use Google Tag Manager with a properly configured purchase trigger (fires on the confirmation page, only once)
  • Verify transaction_id is populated from {{ order_id }} (not hardcoded or empty)
  • Verify value maps to {{ subtotal_price | divided_by: 100.0 }} in the correct currency
  • Check that currency is set to your store's currency code
  • Test with DebugView after every change
  • Monitor the Shopify vs Google Analytics gap weekly

For context on why the numbers will never match perfectly even when everything is configured correctly, see our guide on why Google Analytics revenue differs from Shopify revenue.


When to Consider Server-Side Tracking

If you've fixed your standard setup and still see a gap above 15%, server-side tracking is worth implementing. Options include:

  • Shopify native Measurement Protocol integration (built into some Shopify plans)
  • Stape.io or GTM Server-Side (hosted tag manager proxy)
  • Custom webhook from Shopify that POSTs purchase data to Google Analytics Measurement Protocol when order_created fires

Server-side tracking eliminates ad blockers, redirect issues, and browser-close problems in one move. It's the highest-confidence setup for accurate purchase tracking.


The Bottom Line

Missing purchases in Google Analytics isn't a quirk you accept — it's a real data quality problem that skews every decision you make about your marketing, your funnel, and your product performance.

Wardly monitors your Google Analytics data daily and flags when purchase counts drop unexpectedly relative to your baseline — so you find out about broken tracking the morning after it happens, not three weeks later when you're doing a quarterly review.


Get daily Google Analytics monitoring for your store. Connect Wardly in 5 minutes.

Wardly

Your Google Analytics Data — Ready-Made Reports, No Digging Required

Wardly connects to your Google Analytics and surfaces what went wrong, why it happened, and how to fix it — all in one interactive dashboard.