Skip to content
AE DIGITAL
Analytics & TrackingBy 7 min read

Refunds and returns in GA4: measuring net revenue after Black Friday and Christmas

How to send the GA4 refund event from Shopify and WooCommerce, handle full and partial refunds, and read net revenue by channel and product without mistakes.

Article cover: the word “GA4” next to a glowing icon on a violet space background

Why GA4 revenue is inflated after Black Friday and Christmas

In GA4, refunds are recorded with the refund event, which carries the same transaction_id as the original purchase and the amount returned. If nothing sends it, GA4 keeps counting everything that was later refunded as sold, and the promotional weekend's campaigns look more profitable than they are.

The problem is bigger after peaks. Late November brings many orders from new, often impulsive customers, and December adds gift purchases. In the EU consumers generally have 14 days to withdraw from an online purchase, and many stores extend Christmas returns into January. Refunds for late-November orders therefore land between December and January, after campaign reports have been closed.

The typical case is a campaign with a good return on ad spend in GA4 that mostly brings products sent back later, or a category that looks like the best seller and is also the most returned. To see it, refunds have to be in GA4.

The refund event: structure and parameters

Google's GA4 ecommerce documentation defines a refund event with these parameters:

  • transaction_id: required and identical to the one in the purchase event. If the purchase used the order number (1043) and the refund uses the platform's internal ID, GA4 will not link them.
  • currency and value: the refunded amount, in the same currency as the purchase.
  • items: the refunded items with item_id and quantity. Google recommends including full item details so product reports also show refunds.
  • shipping, tax, coupon: optional.

A minimal partial refund, in Measurement Protocol format:

{"name":"refund","params":{"currency":"EUR","transaction_id":"1043","value":39.90,"items":[{"item_id":"SKU-221","item_name":"Wool jumper","price":39.90,"quantity":1}]}}

GA4 derives separate metrics from these events. In the Data API, grossPurchaseRevenue sums purchases before refunds, refundAmount sums refund events and purchaseRevenue is purchase revenue net of refunds. At product level, itemRevenue is already net of refunded items, while grossItemRevenue is not. If both pairs of values are identical, refunds are almost certainly not arriving.

Full and partial refunds

Full refund

When an order is refunded in full, send the refund with the transaction_id and a value equal to the total returned, ideally with all items. With items, product reports stay consistent; without them, only overall revenue drops.

Partial refund

One item returned out of three, a wrong size, a goodwill refund for a delay. Here items matter: send only the refunded ones, with the returned quantity. For a goodwill refund with no goods returned, send only the value, so revenue drops without any product appearing as returned.

Decide how to treat shipping. If the purchase value included it and you refund it, include it in the refund; if you keep it, leave it out. Pick one rule and apply it every time, or month-to-month comparisons stop making sense. Size exchanges handled as a refund plus a new order produce a refund and a new purchase, which is fine as long as the new order has its own transaction_id.

Sending refunds from Shopify and WooCommerce

Refunds almost always happen in the back office, not in the customer's browser. The site's GA4 tag works on pages the customer sees, so it never sees them.

Shopify

Shopify customer events (pixels) cover browsing and checkout, not actions taken in the admin. Before building anything, check whether the app or tracking service you use already sends refunds. If it does not, use a webhook: under Settings > Notifications > Webhooks you can create one on the Refund create event, in JSON format, pointing to your own endpoint, or have an app or a Make scenario subscribe to that event. If your returns flow is already automated as described in our article on how to automate Shopify returns with Make, sending to GA4 becomes the last module of the same scenario.

WooCommerce

The documentation of the official Google Analytics for WooCommerce extension lists purchases, cart, checkout and product views among tracked events, but not refunds. The options are a server-side tracking plugin that handles them, or a small function hooked to refund creation in WooCommerce that sends the event with the order number and returned items.

Server-side sending with the Measurement Protocol

In both cases the event reaches GA4 through the Measurement Protocol, an HTTP call from your server. What you need to know:

  • you need an api_secret, created in the GA4 web stream, and the stream's measurement_id. The api_secret stays on the server, never in site code;
  • the body requires a client_id. If you save the _ga cookie's client_id in the order attributes at checkout, you can reuse it and tie the refund to the same user;
  • events can be backdated with timestamp_micros by up to 72 hours, but a refund should be recorded when it happens, not on the order date;
  • a session_id can only be attached within 24 hours of the session start, so a refund issued ten days later cannot join the original visit.

A practical rule: send refunds only for orders that have a saved client_id. If the customer declined consent, the purchase is not in GA4, and a refund without a matching purchase lowers revenue for sales that were never counted. For the wider picture, see the GA4 server-side tracking guide.

Reading net revenue by channel and product

By product it is straightforward. In a free-form exploration, use the Item name dimension with the item gross revenue, item refund amount and item revenue metrics. Sorting by refund amount shows at once which products come back.

By channel and campaign it needs more care. A refund is its own event and carries the traffic dimensions of its own session, not the purchase session. A refund sent from the server days later easily ends up under (not set) or Direct: the channel group report shows refunds in the wrong place, and the channel that brought the order stays inflated.

The reliable method is to join purchases and refunds on transaction_id:

  1. export purchases with transaction_id, source/medium and campaign;
  2. export refunds with transaction_id and amount;
  3. join the two tables on transaction_id and calculate net revenue by channel and campaign.

With the GA4 BigQuery export this is one query; without it, a spreadsheet lookup on transaction_id is enough for a few thousand orders a month.

Checking and reconciling with the back office

GA4 will never match the back office to the cent, given declined consent, blockers and manual orders. Reconciliation tells you how wide the gap is and whether it stays stable, as explained in our article on why GA4 and Shopify show different numbers. A monthly check:

  • total refunds for the month in the back office against refundAmount in GA4;
  • number of refunds in the back office against the number of refund events;
  • a sample of ten refunds: does each transaction_id exist in GA4 as a purchase?
  • duplicate refunds on the same order for the same amount, a sign of a webhook received twice and not deduplicated.

Order states, stock and returns accounting should be sorted out before you measure them; we cover that in our article on reliable returns and refunds. If you would like us to set up refund tracking and a net revenue report, you can get in touch through the contact page.

Frequently asked questions

Does GA4 subtract refunds from revenue automatically?

Only if it receives the refund event. Metrics such as purchaseRevenue and itemRevenue are net of recorded refunds, while grossPurchaseRevenue shows the value before refunds. If nothing sends the event, the two values are the same.

Which parameters does the GA4 refund event need?

A transaction_id identical to the purchase, currency and value with the refunded amount and, for partial refunds or product-level data, an items array with the item_id and quantity of the returned items.

Why do refunds show up under Direct or (not set)?

A refund is its own event and carries the traffic dimensions of the session it arrives in. Sent from the server days after the order, it is not linked to the original visit. For net figures by channel, join purchases and refunds on transaction_id.

Does Shopify send refunds to GA4 on its own?

It depends on the app or tracking service you use, so check it. Refunds happen in the admin, so storefront pixels do not see them. The alternative is the Refund create webhook plus a Measurement Protocol call.

Sources

  1. Measure ecommerce — Google for Developers
  2. API Dimensions & Metrics (Google Analytics Data API) — Google for Developers
  3. Send Measurement Protocol events to Google Analytics — Google for Developers
  4. Creating webhooks — Shopify Help Center
  5. Google Analytics for WooCommerce — WooCommerce
  6. Returns and the right of withdrawal — Your Europe - European Union

Related articles

Tell us what isn't working.

We reply within one business day with a first opinion and, if it makes sense, a quote.

Write to us