# Connect Shopify

> Connect a Shopify store to DataFirefly Server-Side: signed Order payment webhook, signing secret, DataFirefly storefront pixel for browsing events.

- Original page: https://server-side.datafirefly.com/en/docs/shopify.html
- Language: en
- Updated: 2026-09-01
- Publisher: DataFirefly (Datafirefly Limited), https://server-side.datafirefly.com/en/

---

No module to install: Shopify pushes orders through signed webhooks, and the DataFirefly storefront pixel covers browsing.

## 1. Create the order webhook

1. Shopify admin: **Settings > Notifications**, then **Webhooks**.
2. Click **Create webhook**, select the **Order payment** event and the JSON format, and point it to:  
   `https://serverside.datafirefly.com/v1/shopify/YOUR-SITE-ID`  
   replacing `YOUR-SITE-ID` with the exact Site ID from [your site page](https://server-side.datafirefly.com/en/docs/connect-your-site.html).
3. Recommended: also add **Refund creation** so refunds flow through. **Checkout creation** and **Cart creation** are only useful until the DataFirefly storefront pixel is in place.

Pick **Order payment**, never **Order creation**: the latter also fires for unpaid orders and causes double counting.

## 2. Paste the signing secret

1. At the bottom of the Webhooks page, Shopify shows the **signing secret**: copy it.
2. Paste it into the **"Shopify webhook signing secret"** field on your DataFirefly site page, then save.

## 3. Add the DataFirefly storefront pixel

1. Shopify admin: **Settings > Customer events > Add custom pixel**.
2. Paste the snippet provided in the Shopify guide in your client area ([**Modules**](https://admin.datafirefly.com/app/connectors) page).
3. Once the pixel is live, delete the Checkout creation and Cart creation webhooks: the pixel replaces them.

## ChatGPT Ads

The purchase is sent from the server, through the signed **Order payment** webhook. The ad click reference (`oppref` and `obref`) is captured by the DataFirefly storefront pixel from step 3, which is pasted into the Shopify admin (**Settings > Customer events**) rather than into the theme: it links the reference to the checkout, and the server attaches it to the purchase. It is captured only with marketing consent.

If you also run your own OpenAI pixel, replace its purchase call with the code given in the Shopify guide in your client area, so that the browser purchase carries the same event ID as the server one (`shopify-order-` followed by the order number). Otherwise, turn off the purchase event in your own OpenAI pixel.

## Consent

The DataFirefly storefront pixel follows the marketing consent recorded by Shopify. When a visitor declines marketing, the pixel sends their events to DataFirefly marked as declined, with no ad click reference, and nothing from them is forwarded to the ad platforms. Orders, however, arrive through signed webhooks that carry no consent signal, so your shop's own consent policy applies to them.

## Verify

1. Place a paid test order: it must show as **Delivered** in Monitoring.
2. The **"Diagnose my connection"** button confirms the latest events received.

## If something goes wrong

- A webhook that keeps failing for about 48 hours is **deleted automatically by Shopify**. If the webhook is gone, check the Site ID in the URL, recreate it and watch Monitoring.
- Duplicate orders? Check that no **Order creation** webhook is left over.
- The other frequent causes are listed in the [troubleshooting guide](https://server-side.datafirefly.com/en/docs/troubleshooting.html).

Updated: September 1, 2026
