# Shopify tracking

URL: https://docs.ablyft.com/developers/tracking-and-events/shopify/

> Track purchases and checkout steps of your Shopify store, with a webhook or with a customer event pixel.



Shopify shops can send data to ABlyft in two ways. They differ in how the data is collected, and you can combine them.

|              | [Webhook](https://docs.ablyft.com/developers/tracking-and-events/shopify/webhook/)           | [Customer event pixel](https://docs.ablyft.com/developers/tracking-and-events/shopify/customer-event/)                                |
| ------------ | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| How it works | Shopify's servers send order data directly to ABlyft                  | A custom pixel in Shopify forwards client-side events through the Web Pixel API                                |
| Reliability  | High. Not affected by browser settings, ad blockers or cookie consent | Can be blocked by ad blockers, browser privacy features or missing consent                                     |
| Data         | Purchases, revenue and number of products, including cart attributes  | Additionally user actions and steps before the purchase, for example checkout started or product added to cart |
| Limitation   | Only order events                                                     | Needs the pixel code and the consent settings in Shopify                                                       |

## Which method should I choose?

For accurate purchase and revenue tracking, the **webhook** is the most dependable choice. Add the **customer event
pixel** if you also want to measure steps before the purchase.

If you use both, remove the goals that the webhook already fires (`purchase`, `revenue` and `products-count`) from the
pixel setup, so they are not counted twice.

> In both cases the ABlyft [snippet](https://docs.ablyft.com/developers/installation/snippet/) must be added to your Shopify theme (`theme.liquid`).
> To test whole themes or templates, see [Shopify variations](https://docs.ablyft.com/guides/experiments/shopify-variations/).

- [Webhook](https://docs.ablyft.com/developers/tracking-and-events/shopify/webhook/): Server-side purchase tracking from Shopify.
- [Customer event pixel](https://docs.ablyft.com/developers/tracking-and-events/shopify/customer-event/): Client-side events through a custom pixel, including product-level goals.
- [Shopify variations](https://docs.ablyft.com/guides/experiments/shopify-variations/): Test draft themes and alternative templates.

