Free guide · Tracking · 6 min read

Is your pixel lying to you?

GA4 counting duplicate purchases? How transaction_id fixes it

GA4 showing more purchases than orders? Why duplicate purchase events happen, how GA4 deduplicates by transaction_id, the empty-string trap, and a 10-minute check you can run today.

  • How GA4 handles transaction_id
  • Three ways duplicates get in
  • How to tell if you have duplicates

Get the free PDF that goes with this guide:

  • Free. No card, no sales call.
  • Short. Use it the same day.
  • No spam. A few useful emails, unsubscribe in one click. Privacy

or read the guide first

Free PDF that goes with this guide:
Is Your Pixel Lying?

On this page
  1. How GA4 handles transaction_id
  2. Three ways duplicates get in
  3. How to tell if you have duplicates
  4. The fix, step by step
  5. Test it in 10 minutes
  6. Questions people ask
  7. Sources

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

  1. Pick 7 full days and count your store orders (Shopify: Analytics or the Orders list, with test and cancelled orders left out).
  2. In GA4, open Reports > Monetization > Ecommerce purchases (or an Exploration) for the same days and note the purchases or transactions count.
  3. 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.
  4. 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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

  1. Open GA4 Admin > DebugView and turn on debug mode for your browser (for example with the Google Tag Assistant).
  2. Place a cheap test order on your store.
  3. In DebugView, find the purchase event. Click it and read transaction_id. It should match the order number in your store admin.
  4. 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.
  5. Count the purchase events. One order should give one purchase per tag. Two from different tags means two sources are live.
  6. 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

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.

Free PDF

Find where your tracking breaks

Ads Manager says 40 purchases. Shopify says 61. Or the other way round. This checklist finds where your Meta, Google and TikTok tracking breaks, in about 30 minutes.

  • Free. No card, no sales call.
  • Short. Use it the same day.
  • No spam. A few useful emails, unsubscribe in one click. Privacy

Free PDF

Is your pixel lying to you?

Ads Manager says 40 purchases. Shopify says 61. Or the other way round. This checklist finds where your Meta, Google and TikTok tracking breaks, in about 30 minutes.

  • Free. No card, no sales call.
  • Short. Use it the same day.
  • No spam. A few useful emails, unsubscribe in one click. Privacy

Keep reading

More free guides

TrackingWhy Meta purchases don't match your Shopify orders (and how to fix it)A gap between Ads Manager and Shopify is normal. A big one means duplicate pixels, broken dedup or no server events. How to tell which, and fix it.Ad creativeHow to test ad creative on Meta: hook rate, hold rate and a simple hook testAn ad creative testing guide for Meta ads: what to test first, the same-body new-hook method, a spend limit set in advance, and how to read hook rate, hold rate and cost per purchase.Client workFacebook ads client onboarding checklist: every access you need, without passwordsA Facebook ads client onboarding checklist for media buyers: Meta partner access, Google and TikTok links, the numbers to agree and the ground rules, before launch.Ad creativeHook rate in Meta Ads: how to add it (and hold rate) as a custom metricHook rate in Meta ads = 3-second video plays / impressions. How to build hook rate and hold rate as custom metrics in Ads Manager in 5 minutes, what each number means, and how to read them.TrackingCheck your tracking before Black Friday: a 30-minute pre-flight checklistA BFCM tracker checklist for Shopify and WooCommerce on Meta: a 30-minute Black Friday and Cyber Monday tracking check. Test a real order, check dedup, values, apps and consent.TrackingMeta Pixel and Conversions API deduplication: how event_id worksFacebook CAPI events deduplication for server-side tracking: why Meta counts some purchases twice when you run the Pixel and Conversions API, how event_id and event_name deduplicate them, and how to test it in 10 minutes.TrackingMeta Event Match Quality: what the score means and how to raise itHow to improve event match quality on Facebook and Meta CAPI: what the EMQ score out of 10 measures, which customer parameters raise it, how to hash them, and a 10-minute check.Tracking"Event_source_url is missing" in Meta Events Manager: what it means and how to fix itevent_source_url in Meta CAPI: why Events Manager says it is missing, which server events need it, the action_source mistake behind most warnings, and a 10-minute test.TrackingRemoved a tracking app? How to find leftover Facebook pixel code in ShopifyUninstalling a tracking app can leave pixel code in your Shopify theme. Where to look (theme.liquid, Customer events, checkout settings), what to search for, and a 10-minute test.TrackingGoogle Ads missing conversions on Shopify? 7 checks before BFCMGoogle Ads conversion tracking problems on Shopify? Fewer purchases than orders: check click-date reporting, conversion status, primary actions, duplicate tags, consent and enhanced conversions.TrackingShopify keeps connecting the wrong Facebook account? How to fix itWhy the Shopify Facebook & Instagram app picks your personal profile or the wrong business, what Shopify and Meta require, and the clean reconnect steps from their own help pages.TrackingShopify data sharing levels: Standard vs Enhanced vs Maximum for MetaWhat each Shopify customer data sharing level sends to Meta, why Standard is pixel only, where to change it in the Facebook & Instagram app, and a 10-minute test after you switch.TrackingPayPal and Stripe showing as referrals in GA4? Here's the fixpaypal.com or checkout.stripe.com showing as a referral in GA4 and taking credit for your sales? Add them to List unwanted referrals in 5 minutes, then test it with one order.TrackingMeta pixel not tracking purchases on Shopify? 8 checks in orderFacebook pixel not tracking purchases on Shopify? Check the app connection, data sharing level, consent, upsell apps, disconnected pixels and the Purchase value, then run a 10-minute test order.