On this page
What this issue is
GA4 records a sale when it receives a purchase event. If you later refund that order in your store or payment provider, nothing tells GA4. The order stays in your revenue reports unless you send a `refund` event that carries the same transaction_id as the original purchase.
A refund can be full or partial. For a full refund you send the transaction_id and no items. For a partial refund you send the transaction_id, plus the items that were refunded with their quantities, or a value for the amount.
Why it costs you leads or sales
This is a reporting problem, so the direct impact is low. It does not stop anyone buying. But it distorts the numbers you use to decide where to spend money.
- Revenue and average order value in GA4 are higher than your bank and store figures.
- Products or campaigns with a high refund rate look more profitable than they are.
- Ad platforms that import GA4 conversions optimise towards orders that are later returned.
- Finance and marketing report different revenue and argue about which is right.
Example: a store with $10,000 of purchases and $1,200 refunded. Without refund events GA4 shows the full amount.
How to check if your site has it
Find a refunded order
Pick a recent order you refunded in your store and note its order ID. It should match the
transaction_idsent with the purchase.Compare totals
In GA4 open Reports > Monetization > Ecommerce purchases and compare revenue with your store's net sales for the same dates. A gap close to your refund total is a strong sign.
Look for the event
Go to Admin > Data display > Events (or Reports > Engagement > Events) and look for an event called
refund. If it is missing, or its count is zero, refunds are not being sent.Check the refund metric
In Explore, add the Refund amount metric next to Purchase revenue. A flat zero while you issue refunds confirms the gap.
How to fix it
Refunds are usually issued by your team in the store admin, so there is no visitor browser to fire a tag. The most reliable fix is to send the event from the server when the refund is created. The Measurement Protocol is the GA4 feature that accepts events sent directly from a server.
- Purchasepurchase event reaches GA4 with transaction_id
- Refund issuedDone in store admin or payment provider
- refund eventNever sent to GA4
- GA4 revenueStill includes the order
The refund happens in the admin, so the browser-based GA4 tag never sees it.
Use a WooCommerce-aware GA4 plugin
If you use WooCommerce, check whether your GA4 plugin has a refund option (often called refund tracking). Enable it and make sure it uses the same order ID as
transaction_idon purchases. Plugin features vary, so check its documentation.Or hook the refund yourself
Use the
woocommerce_order_refundedaction to call the Measurement Protocol (see the code below).
Check your GA4 connection
Some GA4 apps and server-side setups send refunds from Shopify's order webhooks. Look for refund support in the app you use.
Otherwise use a webhook
Subscribe to the
refunds/createwebhook in Settings > Notifications > Webhooks, and have a small service send therefundevent to the Measurement Protocol.
Only for browser-visible refunds
If a refund confirmation page loads in the browser, push a
refundevent withtransaction_idto the dataLayer and add a GA4 Event tag with event namerefundtriggered by it.Use a server container for admin refunds
For refunds made in the admin, a server-side approach or the Measurement Protocol is needed, since GTM web tags need a page view to run.
Call the Measurement Protocol on refund
When your system marks an order as refunded, send a POST request to the GA4 Measurement Protocol endpoint with the
refundevent, thetransaction_id, and aclient_id.Store the client_id at purchase
Save the GA4 client ID with the order so the refund can be linked to the same user. Your API secret is created in Admin > Data streams > your stream > Measurement Protocol API secrets.
curl -X POST "https://www.google-analytics.com/mp/collect?measurement_id=G-XXXXXXX&api_secret=YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"client_id": "CLIENT_ID_SAVED_AT_PURCHASE",
"events": [{
"name": "refund",
"params": {
"transaction_id": "T_12345",
"currency": "USD",
"value": 49.90
}
}]
}'window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: 'refund',
ecommerce: {
transaction_id: 'T_12345',
currency: 'USD',
value: 19.95,
items: [{ item_id: 'SKU_123', item_name: 'Blue Shirt', price: 19.95, quantity: 1 }]
}
});How to confirm it's fixed
Test with a small order
Place a test order, then refund it in the admin.
Watch in DebugView or Realtime
Open Admin > Data display > DebugView (add
debug_modeto the event) or the Realtime report and look for therefundevent.Check parameters
Confirm
transaction_id,currencyandvalueare present and correct.Compare after a day
Allow processing time, then check that Refund amount appears in the Ecommerce purchases report and revenue is closer to net sales.
How to prevent it happening again
- Add refund tracking to your release checklist whenever you change plugins, themes or the checkout.
- Save the GA4 client ID with every order.
- Reconcile GA4 revenue against store net sales once a month.
- Keep the Measurement Protocol API secret in a safe place and rotate it if it leaks.
- Document who is responsible when a payment provider or store app is changed.
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. FunnelGuard runs robot visits through your funnels, such as forms and checkouts, and checks the steps and tracking hits that a visitor triggers. A refund is issued later by your team in the admin, so it is not part of a journey a robot can run.
The kind of tool that fits is data reconciliation or ecommerce analytics auditing: a report or script that compares GA4 refund and revenue figures with your store or payment provider's refunds. FunnelGuard can still check that the purchase event reaches GA4 on your checkout, which is the sale that refunds depend on.
Frequently asked questions
Questions people ask
Why are refunds not showing in GA4?
GA4 only records what it is sent. Refunds are usually made in the store admin or payment provider, so no event reaches GA4 unless you send a refund event with the original transaction_id.
How do I track refunds in GA4?
Send a refund event with the same transaction_id as the purchase. For admin refunds, send it from your server using the GA4 Measurement Protocol. If a refund confirmation page exists in the browser, you can push the event to the dataLayer instead.
Does GA4 automatically subtract refunds from revenue?
No. GA4 does not read your store or payment data. Revenue is only reduced once a refund event is received and processed, and it may take a day to appear in reports.
How do I send a partial refund to GA4?
Send the refund event with the transaction_id and the items array listing only the refunded products and quantities. You can also include value for the refunded amount.
Why does my refund event not match the original purchase in GA4?
The transaction_id is almost certainly different. It must match the purchase value exactly, including prefixes and capitalisation. Check what the purchase event actually sent, in DebugView or the dataLayer.
Do I need the client_id to send a refund with the Measurement Protocol?
Yes, a web stream request needs a client_id. Saving the GA4 client ID with each order at purchase time lets you send the refund against the same user.
Can FunnelGuard check if refunds are sent to GA4?
No. Refunds happen after the purchase, in the admin, so they are outside a robot visitor's journey. A reconciliation or analytics auditing tool is the right fit.
Related issues
- TRK-078purchase sent without transaction_idFix guide
- TRK-082purchase value differs from order totalFix guide
- TRK-096Subscription renewals not tracked as purchasesFix guide
- TRK-077purchase event missing on order confirmationFix guide
- TRK-079purchase fires twice (refresh of thank-you page)Fix guide
- TRK-081purchase value includes or excludes tax/shipping inconsistentlyFix guide