---
title: 'Fix Duplicate Meta Purchase Events on Shopify'
description: 'Stop double-counted Meta Pixel and CAPI Purchase events on Shopify. Audit overlapping Shopify Meta Channel, GTM tags, custom webhooks, and event_id.'
canonical: 'https://plainrouter.com/library/meta-capi-duplicate-purchase-shopify'
format: Guide
last_updated: '2026-11-24'
---

**Short answer:** Duplicate Meta ` Purchase ` events on Shopify almost always happen because **two separate integrations are firing for the same order with different \`event\_id\` values**. The most common culprit is running Shopify's native **Facebook & Instagram** sales channel (set to Maximum data sharing) at the same time as a custom Google Tag Manager (GTM) Pixel tag, a Shopify Customer Events custom pixel, or a third-party server-side CAPI app.

Because each tool generates its own ` event_id ` format, Meta cannot deduplicate them and counts every order twice in Ads Manager (inflating ROAS and distorting bidding).

## 1\. Audit every active Meta Pixel and CAPI sender in Shopify

Before changing code, list every place in your Shopify admin that can send ` Purchase ` events to your Dataset ID:

| Shopify location | What it sends | Conflict risk |
| --- | --- | --- |
| **Sales Channels \> Facebook & Instagram \> Data Sharing (Maximum)** | Browser Pixel + Shopify native CAPI | High if combined with GTM, Elevar, Stape, or custom webhooks |
| **Settings \> Customer Events (Custom Pixels)** | Sandboxed checkout ` checkout_completed ` Pixel calls | High if ` eventID ` does not match your server CAPI ` event_id ` |
| **Online Store \> Themes (\`theme.liquid\`)** | Legacy hardcoded ` fbq('init', ...) ` snippets | High: fires extra browser ` PageView ` / ` Purchase ` without shared ` eventID ` |
| **Settings \> Notifications \> Webhooks (\`orders/create\` / \`orders/paid\`)** | Custom backend CAPI POSTs | High if webhook retries regenerate random UUIDs or overlap with native channel |
| **Third-party apps / GTM / sGTM** | Browser and/or server CAPI ` Purchase ` | High if native Shopify Meta channel is still enabled for the same Pixel ID |

## 2\. Check \`eid\` in DevTools and Events Manager Test Events

Run one real $1 test order (or test gateway checkout) with Chrome DevTools Network open, filtered by ` facebook.com/tr ` and ` ev=Purchase `:

- If you see **two browser requests** to ` facebook.com/tr ` with ` ev=Purchase ` for the same Dataset ID, you have two browser pixels installed (usually the native channel plus a Customer Event or GTM tag).
- Compare the ` eid ` query parameter on the browser ` Purchase ` call with the ` event_id ` shown on the server CAPI event in Events Manager Test Events. If one looks like ` sh-1a2b3c... ` (Shopify native format) and the other looks like ` order_5891234 ` or a random UUID, Meta will never deduplicate them.

## 3\. Pick ONE canonical owner for \`Purchase\` (or share one deterministic \`event\_id\`)

You have two clean architectural fixes:

- **Option A (Recommended for clean attribution): Pick one owner per Dataset ID.** If you run a dedicated first-party CAPI pipeline, disable duplicate CAPI/Pixel senders on that same Dataset ID so only one browser + server pair fires per order with one shared ` event_id `.
- **Option B: Use a deterministic order-based \`event\_id\` on both Custom Pixel and Webhook.** In Shopify Customer Events (` checkout_completed `) and your ` orders/paid ` webhook, derive the exact same string from Shopify's checkout token or order ID:

```javascript
// Shopify Customer Events (Custom Pixel)
analytics.subscribe("checkout_completed", (event) => {
  const checkout = event.data.checkout;
  const eventId = `shopify_checkout_${checkout.token}`;

  fbq("track", "Purchase", {
    value: Number(checkout.totalPrice.amount),
    currency: checkout.currencyCode,
  }, {
    eventID: eventId, // Must be the 4th argument to fbq()
  });
});
```

```json
// Matching backend CAPI payload from orders/paid webhook
{
  "data": [
    {
      "event_name": "Purchase",
      "event_id": "shopify_checkout_<same_checkout_token>",
      "event_time": 1732470000,
      "action_source": "website",
      "user_data": {
        "em": ["973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b"],
        "fbp": "fb.1.1732469000000.1834267592"
      },
      "custom_data": { "value": 89.0, "currency": "USD" }
    }
  ]
}
```

## 4\. Guard against Shopify webhook retries and thank-you page reloads

- **Webhook retries:** Shopify retries webhooks if your endpoint takes longer than 5 seconds or returns a non-2xx status. Always derive ` event_id ` from ` checkout_token ` or ` order.id ` (never ` crypto.randomUUID() `), and return HTTP ` 200 ` quickly after enqueueing.
- **Thank-you page refreshes:** Customers frequently reopen the order confirmation email link days later. Shopify's ` checkout_completed ` Customer Event fires once per checkout, whereas legacy ` Additional Scripts ` code could re-fire on reloads unless guarded by ` first_time_accessed `.

For deeper deduplication rules (including Meta's 48-hour window and case-sensitive ` event_name `), read [why Meta Pixel and CAPI fail to deduplicate with the same event\_id](</library/meta-capi-same-event-id-not-deduplicating>) and [Meta event\_id deduplication](</library/meta-event-id-deduplication>). To compare independent first-party checkout counts directly against Meta's claimed purchases, see [Plainrouter Signals](</solutions/shopify>) and [verify Signals ingestion](</docs/signals/verify-ingestion>).

## Frequently asked questions

### Can I run Shopify's native Facebook & Instagram channel alongside a third-party CAPI tool?

Only if they do not send overlapping ` Purchase ` events to the same Pixel/Dataset ID with different ` event_id ` formats. Running two separate CAPI integrations against the same Dataset ID almost always causes double-counted revenue.

### Why did duplicate purchases start after upgrading to Shopify Checkout Extensibility?

Many stores added a new Customer Events custom pixel during the Checkout Extensibility migration while leaving the native Meta channel or legacy GTM tags active, causing two ` Purchase ` events per checkout.

### How do I check if Shopify orders match Meta Ads Manager purchases?

Compare a 7-day export of actual paid Shopify orders against Meta Events Manager total ` Purchase ` events (Browser + Server after deduplication). If Events Manager ` Purchase ` volume exceeds total store orders across all channels, you have duplicate firing.
