> For the complete documentation index, see [llms.txt](https://help.littledata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.littledata.io/sources/shopify/tracking-order-refunds-with-littledata.md).

# How we track refunds in Segment and Google Analytics

Littledata tracks refunds from your Shopify store and sends them to GA4 and Segment. This page explains what we track (and don't track) for refunds and returns, and where to find refund data.

Refunds are one of several post-purchase events Littledata tracks, along with [post-purchase upsells](https://help.littledata.io/sources/shopify/tracking-post-purchase-upsells-in-the-shopify-checkout), [recurring orders (subscriptions)](https://help.littledata.io/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout) and cancellations.

### What is a refund event?

When you refund an order in Shopify admin, Littledata sends a refund event to your connected destinations. The event includes the details of the original order, so you can match the refund to the purchase.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-6088df5a491e9cefe220baa8d28b3fa410396be5%2Fhc-shopify-order-refund-screen.png?alt=media" alt=""><figcaption></figcaption></figure>

Littledata finds the original order's tracking IDs (such as the GA4 client ID) from the data it saved when the order was placed. If it can't find them, the refund is still sent, just without those IDs.

{% hint style="info" %}
Littledata only sends a refund when money is returned to the customer. If a refund in Shopify has no payment transaction (for example, you only restock items), no refund event is sent.
{% endhint %}

### Returns vs refunds

Some return apps let customers swap products or get store credit instead of money back. Examples include:

* Returnly
* AfterShip
* Refund Logic

Shopify treats an exchange as an order edit (product A is swapped for product B), not a refund. So no refund event is sent to any destination. A return only creates a refund event when all or part of the order value is refunded to the customer.

### Supported refund types

Littledata supports all refund types in Shopify:

* **Full refund:** you refund the whole order. The refund event includes every product in the order, plus details such as shipping.
* **Partial refund:** you refund some items from the order (for example, 3 out of 5). The refund event includes only the refunded products.
* **Custom refund:** you refund a specific amount. The refund event includes no products, only the amount refunded.

| Destination          | Full refund | Partial refund | Custom refund |
| -------------------- | ----------- | -------------- | ------------- |
| Google Analytics 4   | ✔           | ✔              | ✔             |
| Segment              | ✔           | ✔              | ✔             |
| Meta Conversions API | ❌           | ❌              | ❌             |

Meta does not have a standard event for refunds, so Littledata does not send refunds to Meta.

### Refunds in GA4

Littledata sends a `refund` event to GA4. To see your refunds, create an exploration in GA4 with the **Transaction ID** dimension and the **Refund amount** metric.

{% hint style="info" %}
[See how to build a sales performance report in GA4.](https://help.littledata.io/google-analytics/conversions/how-to-build-a-sales-performance-report-in-ga4)
{% endhint %}

### Refunds in Segment

Littledata sends an `Order Refunded` event to Segment. To see it, open the debugger for your Littledata source in Segment and click an **Order Refunded** event.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-35635e9317dda0c7c623fccda441fae244e501e3%2F5.avif?alt=media" alt=""><figcaption></figcaption></figure>

### Attribution for refunds

In GA4, the source and medium of a refund can be different from the original purchase. The refund uses the customer's most recent session, and it is dated on the day the refund is sent.

For example, customer A buys on day 1 from `google / cpc`. On day 2, they come back from `google / organic`. If you then refund the first order, GA4 attributes the refund to `google / organic`, on the day of the refund.

### Why net revenue can differ between GA4 and Shopify

Littledata sends the refund when it happens, so GA4 records it on the refund date, not the original order date. When you compare net revenue for a date range, a refund may land in a different period than its order. This can cause expected differences between GA4 and Shopify reports.

### Refunds with multi-currency

If your store sells in more than one currency, the GA4 refund event uses the currency the customer paid in (the presentment currency). The Segment event includes both the store currency amount and the presentment amount and currency.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-a9b3132988b19ac0f18b67f7a7611a6c7766a4be%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Turn off refund events

You can stop sending refunds to a destination in the Littledata app.

{% stepper %}
{% step %}

### Open the destination settings

In the Littledata app, find the GA4 or Segment destination and click **Settings**.
{% endstep %}

{% step %}

### Open the Event Editor

Open the **Event Editor** tab and find the refund event.
{% endstep %}

{% step %}

### Disable the event

Click the three-dot menu on the event row, select **Disable**, then click **Save**.

For more detail, see [Enable or disable events](https://help.littledata.io/event-editor/enable-disable-events).
{% endstep %}
{% endstepper %}

### Related articles

* [How the Shopify to GA4 connection works](https://help.littledata.io/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4)
* [How the Shopify to Segment connection works](https://help.littledata.io/integrations/shopify-to-segment/how-it-works)
* [Refunds tracking in Shopify: turn ecommerce loss into your secret weapon](https://help.littledata.io/google-analytics/conversions/track-refunds-shopify-ga4)
* [GA4 tracking plan](https://docs.google.com/spreadsheets/d/1Qt9P8RQqfcu8SR07sZByViQrBg8808DGDIXpIjR9Wxo/edit#gid=277331750)
* [Segment tracking plan and event schema](https://docs.google.com/spreadsheets/d/1aljowRhMU9_7uGXmcipbP1Y14S4cOSdXGQA2Vx7BHko)
