- GA4 does not see Shopify refunds by itself: they happen in the admin, where no GA4 tag runs.
- A refund reaches GA4 as a refund event with the same transaction_id as the purchase, sent from a server through the Measurement Protocol.
- GA4 subtracts refunds from purchase revenue; with refunded items in the event, it also subtracts them from item revenue.
- The Measurement Protocol only accepts events up to 72 hours old, so refunds have to be sent close to when they happen.
- GA4 and Shopify will still differ on refunds: dates, tax and shipping, exchanges and purchases GA4 never received.
To track Shopify refunds in GA4, each refund has to be sent to GA4 as a refund event, with the same transaction_id as the original purchase, from a server through the Measurement Protocol. GA4 then subtracts the refunded value from purchase revenue. Without that event, GA4 never learns about the refund, and its revenue stays at what was ordered, not what you kept.
This guide explains why GA4 misses refunds, what a correct refund event contains, how a partial refund flows from Shopify to GA4 with numbers, how to check it, and why the two systems will still not match to the cent.
Why GA4 misses refunds by default
GA4's tag runs in the shopper's browser, on your storefront and checkout. A refund happens somewhere else: you or a returns app create it in the Shopify admin, often days or weeks after the order. There is no page view and no browser in which a tag could fire.
Google's ecommerce documentation describes the fix: measure refunds by sending a refund event with the transaction id of the purchase, and include the refunded items to get item-level refund metrics. Because the refund happens outside the browser, that event has to come from a server, which is what the Measurement Protocol is for.
The cost of skipping it depends on your return rate. A store selling clothing, with many returned sizes, can see GA4 revenue well above what it keeps, and every ROAS calculated from GA4 revenue is too high by the same share.
Refunds and exchanges: what gets tracked
| What happens in Shopify | Money back? | What GA4 should receive |
|---|---|---|
| Full refund | Yes, all | A refund event for the whole order |
| Partial refund of some items | Yes, part | A refund event with the refunded items and their value |
| Exchange for the same price | No | Nothing: revenue is unchanged |
| Exchange for a cheaper item | Yes, the difference | A refund event for the difference |
| Cancelled order with a refund | Yes | A refund event; the purchase stays counted |
How a refund reaches GA4
- Catch the refund
Shopify sends a refunds/create webhook when a refund is created. A server-side tool, or your own code, listens for it.
- Find the transaction id
Use exactly the transaction_id the purchase was sent with: the Shopify order id, the order name or the order number, depending on your setup. A different format means GA4 cannot match the refund.
- Build the event
Set value to the refunded amount without tax, currency in ISO 4217, and items with item_id, price and quantity of the refunded lines. Google says value should not include tax or shipping.
- Send it with the right ids
Post the event to the Measurement Protocol with your measurement id and API secret, and a client id. The protocol accepts events up to 72 hours old.
- Wait for processing
Like any GA4 data, the refund can take 24 to 48 hours to appear in reports.
Worked example: a partial refund from Shopify to GA4
An example order, #2207, with US sales tax:
| Line | Amount |
|---|---|
| Summer dress, 1 × $80 | $80.00 |
| Leather belt, 2 × $20 | $40.00 |
| Items | $120.00 |
| Shipping | $5.00 |
| Sales tax, 8% of items | $9.60 |
| Order total | $134.60 |
The customer sends one belt back. You refund it in Shopify: $20 plus $1.60 of tax, $21.60 in total. The refund event and the result in GA4:
refund transaction_id=2207Same id as the purchasevalue=20.00 currency=USDRefunded amount without taxitems=[{item_id: belt-brown, price: 20, quantity: 1}]The refunded linepurchase revenue 2207: 120.00 → 100.00Result in GA4 after processing| GA4 metric for transaction 2207 | Before the refund | After the refund |
|---|---|---|
| Gross purchase revenue | $120.00 | $120.00 |
| Refund amount | $0.00 | $20.00 |
| Purchase revenue | $120.00 | $100.00 |
| Item revenue (belt) | $40.00 | $20.00 |
A checklist for matching GA4 refunds to Shopify
- Same transaction id
In Explore, build a free-form table with Transaction ID as the row and Gross purchase revenue, Refund amount and Purchase revenue as values. Search for the order. If the purchase is not there, there is nothing for the refund to reduce.
- Timing
Note when you created the refund and compare a date range that covers a few days after it, not a single day.
- Currency
A refund in a different currency than the purchase is converted at another day's rate, so a full refund may not cancel the purchase to the cent.
- What value contains
Check whether your purchase value includes tax and shipping and whether your refund value does. If they differ, refunded transactions keep a remainder.
- Delivery versus result
A refund event that was delivered is not the same as a transaction whose revenue went down. Check both: the log of your tool, then the transaction in GA4.
Why GA4 refund reports won't match Shopify exactly
- Different days. GA4 records the refund on the date of the refund event, and processes it a day or two later. Shopify reports refunds on the day they were created. Neither moves the refund back to the order date.
- Different values. Shopify's refund includes tax and sometimes shipping or adjustments; the GA4 event follows your tool's rules.
- Missing purchases. Orders GA4 never received, because of ad blockers, consent choices, draft orders or other sales channels, cannot be reduced.
- Exchanges. They are returns in Shopify but not refunds in GA4, unless money goes back.
- Old refunds. The Measurement Protocol does not accept events older than 72 hours, so refunds from before the setup cannot be sent.
The wider gap between the two systems is covered in GA4 vs Shopify revenue.
What you can see in GA4 once refunds flow in
- Refund amount and item refund amount as metrics in explorations, next to gross purchase revenue and gross item revenue.
- Purchase revenue and item revenue net of refunds in every report that uses them, including the acquisition reports.
- Refund rate by channel or campaign, as refund amount divided by gross purchase revenue, in an exploration with Session default channel group or Session campaign as the row.
- Products that come back, from item refund amount per item name.
One trap: GA4's Transactions metric counts refund events as transactions too. Use Ecommerce purchases to count orders. Refund data in GA4 is useful for marketing analysis; for what your store actually kept after refunds, costs and fees, use your store's numbers, as described in Shopify profit tracking.
How ROASaurus sends Shopify refunds to GA4
Install the ROASaurus Shopify app and add GA4 as a destination under Connections › Tracking & destinations, with your measurement id and a Measurement Protocol API secret. Purchases and refunds are the two events the GA4 destination has ticked by default.
| Part of the refund event | What ROASaurus sends |
|---|---|
| Trigger | Shopify's refunds/create webhook, for every refund of a tracked order |
| transaction_id | The Shopify order id, the same as on the purchase ROASaurus sent |
| value | The refunded amount without tax: the refunded items, plus refunded shipping when you refund it |
| currency | The same as the purchase |
| items | The refunded lines with item_id, item_name, price and quantity |
| Timestamp | The time of the refund, so GA4 records it on the day it happened |
| Identity and consent | Taken from the order's purchase: without consent, no user data and no browser ids |
Each delivery appears under Data quality › Deliveries with its status and GA4's response, so you can check delivery before you check the result in GA4. Test mode sends events to GA4's validation server, which checks them without recording anything.
ROASaurus also counts refunds in its own reports, on the day they happened: net revenue, profit per order and product, and ROAS and POAS after refunds, without depending on GA4. Before peak season, the BFCM tracking checklist includes refunds; email platforms handle refunds differently again, see the Klaviyo and Shopify tracking guide. How the server-side delivery works is on the server-side tracking page and in what server-side tracking is.
Sources
- Google Analytics for developers: Measure ecommerce (refunds)
- Google Analytics for developers: Recommended events reference (refund)
- Google Analytics for developers: Send Measurement Protocol events
- Google Analytics Data API: API dimensions and metrics (refundAmount, transactions)