On this page
Short answer: GA4 deduplicates purchase events that share the same transaction_id. Google's help page says it plainly: "Google Analytics deduplicates purchase events with the same transaction ID." So if GA4 shows more purchases than your store has orders, the usual reason is that your purchase events either have no real transaction_id, or each copy of the same order arrives with a different one. Send every purchase with the order number as transaction_id, from one source, and the duplicates stop.
The opposite problem is just as real. If your tag sends the same transaction_id for different orders, or an empty one, GA4 merges real sales and you undercount. The rest of this guide shows how to tell which one you have and how to fix it.
How GA4 handles transaction_id
From Google's help page "Minimize duplicate key events with transaction IDs" and the GA4 events reference:
| Rule | What Google says |
|---|---|
| Is transaction_id required on purchase? | Yes. The purchase event reference lists it as required. |
| What it does | It "helps you avoid getting duplicate events for a purchase." |
| Dedup | GA4 deduplicates purchase events with the same transaction ID. |
| Unique per order | "The transaction ID must be unique for each order", for example the order confirmation number. |
| Across users | The same ID "shouldn't be used across different users." |
| Empty string | Don't send it. GA4 will deduplicate all purchase events that have transaction_id="". |
| Privacy | The ID must not contain anything that could identify a customer. |
Google doesn't publish a time window for this dedup, so don't rely on one. Treat it simply: one order, one ID, every time.
Three ways duplicates get in
1. Two tags sending the same purchase
The most common setup problem. A store installs the Shopify Google & YouTube app for GA4, and an older GA4 snippet, a tag manager container or another tracking app still sends its own purchase. If both carry the same order number, GA4 should merge them. If one sends a different ID, or none, you get two purchases for one order.
2. The ID changes between sends
Some custom setups build transaction_id from something random or time based, or from a cart token instead of the order number. Then a reloaded thank-you page, or a second tag, sends the same order under a new ID, and GA4 has no way to know it is the same sale.
3. No ID or a fixed placeholder
If the value is missing, hardcoded (like "12345"), or an unfilled template variable, GA4 can't dedup properly. A fixed value is the worst case: Google warns that sending the same ID for different transactions means you "could significantly undercount" your key events. An empty string merges every purchase that has it.
How to tell if you have duplicates
- Pick 7 full days and count your store orders (Shopify: Analytics or the Orders list, with test and cancelled orders left out).
- In GA4, open Reports > Monetization > Ecommerce purchases (or an Exploration) for the same days and note the purchases or transactions count.
- Compare. GA4 a bit lower than your store is normal, because some shoppers block analytics or don't consent. GA4 higher than your store is the red flag for duplicates.
- Build an Exploration with the dimension Transaction ID and the metric Ecommerce purchases. Sort by purchases. Any ID with 2 or more, a blank row, or one ID covering many sales tells you which of the three problems you have.
The free purchase gap checker does the maths for Meta vs your store, and the same gap logic works for GA4.
The fix, step by step
- List every place that can send a GA4 purchase. The Google & YouTube app, any gtag.js snippet in your theme or checkout settings, a Google Tag Manager container, and any third-party tracking app. If you removed a tracking app, check for leftover code with the old pixel code guide. The same leftovers apply to Google tags.
- Keep one source for the purchase. On Shopify, Shopify's help page sets GA4 up through the Google & YouTube sales channel, and says certain ecommerce events are tracked automatically after that. If the app is your source, turn off purchase tags from the other places, not the app.
- Use the order number as transaction_id. For any custom tag, pass the real order or confirmation number as a dynamic value. Never a fixed value, never an empty string, never an email or name.
- Check the value is filled in. Google suggests viewing the page source on the confirmation page and confirming the ID is substituted, not a placeholder.
- Watch the next 7 days with the Exploration above. Each transaction ID should show 1 purchase.
On Shopify, also check the store isn't in private mode. Shopify says Google Analytics can't track events until you deactivate private mode for your online store.
Test it in 10 minutes
- Open GA4 Admin > DebugView and turn on debug mode for your browser (for example with the Google Tag Assistant).
- Place a cheap test order on your store.
- In DebugView, find the purchase event. Click it and read transaction_id. It should match the order number in your store admin.
- Reload the thank-you page once. If a second purchase appears, check that it carries the same transaction_id. If it carries a different one, or none, that's your duplicate source.
- Count the purchase events. One order should give one purchase per tag. Two from different tags means two sources are live.
- Refund or cancel the test order the way you normally would.
Run the same test after any theme change, app install or checkout change. That's when duplicate tags usually come back.
Is Meta double counting too? The CAPI deduplication guide covers the Meta side, where the match key is event_id instead of transaction_id. For Google Ads, see Google Ads missing conversions on Shopify. If paypal.com or stripe.com is taking credit for your sales in GA4, see PayPal and Stripe showing as referrals in GA4.
Questions people ask
Why does GA4 show more purchases than Shopify?
Usually because more than one tag sends the purchase and the copies don't share the same transaction_id, so GA4 can't merge them. GA4 deduplicates purchase events with the same transaction ID. Check which tags send purchase and make sure each sends the order number.
Does GA4 deduplicate transactions automatically?
Yes, for purchase events that share the same transaction_id, according to Google's help page. It only works if the ID is real and unique per order. Missing, random or changing IDs break it.
What happens if transaction_id is empty in GA4?
Google says not to send an empty string, because GA4 will deduplicate all purchase events that have transaction_id="". That merges different orders and undercounts your sales.
Is transaction_id required for the GA4 purchase event?
Yes. Google's events reference marks transaction_id as required for purchase. Google also says to add a transaction ID to ecommerce events so refunds process properly.
Can I use the customer's email as transaction_id?
No. Google says the transaction ID must not include information that could identify individual customers. Use the order or confirmation number.
Why does GA4 show fewer purchases than Shopify?
Some gap is normal, since ad blockers and consent choices stop some tags. A big gap can mean a fixed or empty transaction_id merging different orders, private mode on the store, or a missing tag on checkout. Run the 10-minute test above.
Sources
- Google Analytics Help: Minimize duplicate key events with transaction IDs
- Google for Developers: Measure ecommerce (GA4)
- Google for Developers: GA4 recommended events reference: purchase
- Shopify Help Center: Setting up Google Analytics 4
- Google Ads Help: Shopify: Set up your Google tag
Platform menus and defaults change often. This guide reflects them as of 30 Nov 2026. Nothing here promises results: they depend on your store, offer, budget and execution.