> 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-post-purchase-upsells-in-the-shopify-checkout.md).

# Tracking post-purchase upsells on Shopify

How Littledata tracks post-purchase upsells on Shopify and sends them to GA4, Segment and the Meta Conversions API.

Littledata tracks post-purchase upsells for Shopify stores and sends them to destinations such as [GA4](https://help.littledata.io/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4), Segment and the Meta Conversions API (CAPI). This extends Littledata's [Shopify checkout tracking](https://help.littledata.io/sources/shopify/shopify-checkout-extensibility), so you can report on upsells and use them for retargeting.

### How upsell tracking works

#### What is a post-purchase upsell?

A post-purchase upsell happens when a customer accepts an extra product right after completing the checkout, usually on an upsell page. When the customer accepts the offer, Shopify updates the original order to include the extra product.

Upsells can raise your average order value (AOV), but they can also make your data harder to read. Littledata sends upsells as their own events, so they don't get mixed up with the original purchase.

#### Which upsell apps does Littledata track?

Littledata tracks post-purchase upsells from any Shopify app. We have tested upsell tracking with these apps:

* [Rebuy](https://www.littledata.io/shopify/rebuy)
* Zipify
* CartHook
* ReConvert
* Bold
* Honeycomb
* [Nosto](https://help.nosto.com/en/articles/11530626-what-is-post-purchase-upsell-and-how-does-it-work#h_a632f42b38)

#### A typical upsell journey

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-9c113ddd9be48b955861e6a446b313a6d236f4ca%2Fscreenshot-2022-12-01-at-9.58.02-am.png?alt=media" alt="Flow from checkout steps to the order, upsell page, upsell event and thank you page"><figcaption></figcaption></figure>

Right after the customer pays, they see the upsell page. If they accept the upsell, Shopify sends Littledata an order update. Littledata then sends an upsell event to your connected destinations.

#### What triggers an upsell event?

Littledata listens for Shopify's order update webhook. It tracks an upsell when the updated order has new products, or a higher quantity of a product, compared to the previous version of the order.

{% hint style="warning" %}
Upsells are tracked when the order is updated within 24 hours of the order being placed (or of the last tracked upsell on that order). Order updates after that are not tracked as upsells.
{% endhint %}

#### How are upsell values calculated?

Only the added products and quantities are included in the upsell event. Ecommerce values such as revenue, tax and shipping are calculated as:

```
updated order value - previous order value
```

This way, the upsell event only includes the extra amount, such as any extra shipping cost.

### Viewing upsell events

#### GA4

When the order is first placed, Littledata sends a `purchase` event to GA4. When the customer accepts an upsell, Littledata sends a separate `upsell` event with the same transaction ID. The `upsell` event only includes the added products.

Because the upsell is a separate event, it doesn't create a second purchase in GA4.

| GA4 event name     | Trigger                                   | Transaction ID |
| ------------------ | ----------------------------------------- | -------------- |
| `add_payment_info` | A payment method is added in the checkout | -              |
| `purchase`         | The order is created in Shopify           | #1234          |
| `upsell`           | The customer accepts the upsell           | #1234          |

{% hint style="info" %}
Read more about [how the Shopify to GA4 connection works](https://help.littledata.io/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4).
{% endhint %}

#### Segment

When the order is first placed, Littledata sends an **Order Completed** event to Segment. When the customer accepts an upsell, Littledata sends a separate server-side event called **Post purchase upsell**, with only the added products.

| Segment event name       | Trigger                                   | `order_id` |
| ------------------------ | ----------------------------------------- | ---------- |
| **Payment Info Entered** | A payment method is added in the checkout | -          |
| **Order Completed**      | The order is created in Shopify           | #1234      |
| **Post purchase upsell** | The customer accepts the upsell           | #1234      |

{% hint style="info" %}
See the full [Segment tracking plan and event schema](https://docs.google.com/spreadsheets/d/1aljowRhMU9_7uGXmcipbP1Y14S4cOSdXGQA2Vx7BHko/edit#gid=737675841).
{% endhint %}

Here is how the checkout and upsell events look in the Segment debugger:

<div data-with-frame="true"><figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-fae73cbb1ae6839f103ef56f103d7edd17a32282%2Fscreenshot-2024-01-12-161843.png?alt=media" alt="Segment debugger showing checkout events, Order Completed and Post purchase upsell"><figcaption></figcaption></figure></div>

#### Meta Ads

With Littledata's [Shopify to Meta Conversions API connection](https://help.littledata.io/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api#server-side-events), you can use upsell data in Meta Ads. This helps with conversion reporting and with building audiences.

When the order is first placed, Littledata sends a **Purchase** event to Meta. When the customer accepts an upsell, Littledata sends a separate server-side event called **Post purchase upsell**, with only the added products.

| Meta event name          | Trigger                                   |
| ------------------------ | ----------------------------------------- |
| **AddPaymentInfo**       | A payment method is added in the checkout |
| **Purchase**             | The order is created in Shopify           |
| **Post purchase upsell** | The customer accepts the upsell           |

Here is how it looks in Meta Events Manager:

<div data-with-frame="true"><figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-bf0ef76e1a4c703be841c1074b2b374133fd7fbc%2Fscreenshot-2022-12-01-at-10.42.04-am.png?alt=media" alt="Post purchase upsell server event in Meta Events Manager"><figcaption></figcaption></figure></div>

For example, you could build a lookalike audience from customers who accepted an upsell, or see which campaigns led to more upsells.

{% hint style="info" %}
See Littledata's [Meta CAPI tracking schema](https://docs.google.com/spreadsheets/d/1jHJo6hcAYSdYpL0SLRXqtbyDtOmApoF2vn8AQyQ9rgU/edit#gid=1443141432).
{% endhint %}

### Edge cases

* If an order is edited by hand in the Shopify admin, or by an order editing app, Littledata handles it as an upsell.
* If a product is added to the order, an upsell event is sent. If a product is removed, no upsell event is sent.

### Related articles

* [Tracking the Shopify checkout](https://help.littledata.io/sources/shopify/shopify-checkout-extensibility)
* [Tracking Shopify checkout steps in Google Analytics](https://help.littledata.io/integrations/shopify-to-google-analytics/checkout-funnel-steps)
* [Tracking subscription orders in the Shopify checkout](https://help.littledata.io/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout)
* [How it works: Shopify to Meta Conversions API (CAPI)](https://help.littledata.io/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api)
