A checklist for GA4 purchase IDs and refunds
The Good ROAS Club · Nov 28, 2026
Transaction IDs help Google Analytics deduplicate purchases and process refunds. Here is what to check in your purchase and refund events, with a worked example.
Why two small details matter
A repeated purchase event can overstate sales. A bad transaction ID can do the opposite and hide real orders. A missing refund event leaves a returned order looking like it stayed sold. Google's documentation covers each of these, and they are worth checking before you use Google Analytics revenue to judge a campaign.
Google says ecommerce events aren't sent automatically in general; you add them to your site, app or Tag Manager container. It also notes that on Shopify, some events are tracked automatically through the Shopify Pixel. Find out what your setup already sends before adding anything, so the same order isn't sent twice by two routes.
Transaction IDs
Google says to add a transaction ID, such as an order confirmation number, to deduplicate transactions from the same user and to process refunds properly. When two purchases arrive with the same ID, Analytics deduplicates them.
Check these rules:
- Each order has its own unique ID.
- The value is filled in dynamically. Google warns that sending the same ID for different transactions could seriously undercount key events.
- The ID is never an empty string. Google says it will deduplicate all purchase events sent with an empty transaction ID.
- The same ID isn't used across different users.
- The ID contains nothing that could identify an individual customer. Don't build it from an email address or phone number.
Letters, numbers and special characters such as dashes or spaces are allowed.
Purchase events
Google's web example sends a purchase event with a transaction ID, value, tax, shipping, currency and a list of items. Set currency whenever you send a value. Google's developer guide also recommends setting every ecommerce parameter you have data for.
Refund events
Google Analytics measures both full and partial refunds with the refund event. The event needs the relevant transaction ID, which should match the original purchase.
Google's pages describe item details with different strength. The help article says to include each refunded item in an items array for full and partial refunds alike. The developer pages recommend including items so you can see item-level refund metrics. Sending them satisfies both. The developer guide shows items defined with an item ID and quantity.
If you send a refund value, send currency with it. The events reference says to set value to the sum of price times quantity for the items, without shipping or tax. Shipping and tax have their own parameters. Check this carefully if your refund system reports a single total that includes them.
A hypothetical example
This order is invented. Order A-1001 has two shirts at 30 dollars each and one hat at 20 dollars, so the item total is 80 dollars. Shipping and tax are extra.
The customer returns one shirt. Your refund event would use transaction ID A-1001, currency USD and value 30, with the shirt's item ID and a quantity of 1. If the payment system returned 33 dollars because it included 3 dollars of tax, the event's value would still be 30 under the events reference guidance, with tax sent separately.
How to test
- Place a test order where it won't be mistaken for a real sale, ideally in a test property.
- Turn on debug mode and use DebugView to see the events as they arrive. Google says standard reports and explorations can take up to 24 hours to fill with ecommerce data.
- Reload the order confirmation page and check that any repeat purchase event carries the same ID.
- Place a second order and confirm its ID is different.
- Send a partial refund for a test order and compare its ID, items, quantity and value with your records.
- Ask who or what sends refunds. A refund issued in your store or payment system needs a working path to Analytics, so don't assume one exists.
Limits
These checks make your implementation more consistent, but they won't make Analytics match your store's order records exactly. Keep your commerce system as the record for orders and money returned, and compare it with Analytics regularly. When the two differ, sample individual transaction IDs to see which orders are missing, repeated or not refunded.