Articles ·

Meta Conversions API event deduplication: how the event ID works

Meta merges a browser and server event when both carry the same event name and event ID within 48 hours. Which ID to use on Shopify and how to check it.

Meta treats a browser event and a Conversions API event as the same event when they reach the same pixel with the same event name and the same event ID within 48 hours. So give every event one unique ID (the order ID works for Purchase), send it as eventID in the fbq call and as event_id in the server payload, and check the Event Deduplication tab in Events Manager.

Deduplication matters when one event is sent twice: by the Meta Pixel in the browser and from a server through the Conversions API. Meta compares two keys, the pixel’s event against the server’s event_name and the pixel’s eventID against the server’s event_id. When both match within 48 hours, Meta keeps one copy and drops the other. If the IDs differ by a single character, or one side sends none, Meta counts two events, and the store ends up with more purchases in Meta than orders in Shopify.

When you need deduplication, and when you don’t

You need it when the same event goes to the same pixel from two places. The usual case is a browser pixel plus a server setup sending Purchase for the same order.

You don’t need it when each event has only one source. Meta’s docs say so: advertisers who don’t send the same event through both the Pixel and the Conversions API don’t need to set up deduplication for those events. A server-only setup still benefits from a stable ID, because a send that gets retried should look like the same event, not a new one.

And deduplication can’t fix two different tools sending the same event. If the Facebook & Instagram app and a tracking app both send Purchase, each one makes up its own IDs. Nothing you do in Meta will make those match. You have to turn one of them off. How to find duplicate Meta pixels on Shopify walks through finding every source.

What Meta compares

Meta merges two events only when all four of these hold:

  • Same pixel. Both events go to the same pixel (dataset) ID.
  • Same event name. Purchase in the browser and Purchase on the server. Not purchase, not checkout_completed, not a custom name on one side.
  • Same event ID. The exact same string in eventID and event_id.
  • Within 48 hours. Meta counts from the first event it receives with that ID. A server event that arrives three days after its browser twin is counted again.

When a pair matches, Meta generally keeps the one it got first. If they arrive within about five minutes of each other, it favours the browser event.

There’s a second method based on fbp (the browser cookie ID) and external_id instead of an event ID. It’s weaker: it generally only works when the browser event arrives first, and it does nothing if you only have one source. Treat the event ID as the method and fbp as a backup.

Step 1: Pick one ID per event

The ID has to be the same on both sides and different for every event. Both halves matter.

  • Purchase: use the order ID. It’s unique, and the browser and your server both know it. Meta’s own docs suggest an order number or transaction ID.
  • Other events (PageView, ViewContent, AddToCart, InitiateCheckout): there’s no order yet, so generate an ID in the browser and send it to your server along with the event. In a Shopify custom pixel, every event already has one in event.id.

Two mistakes are common. The first is generating a fresh random ID on each side, so the browser and server never match. The second is reusing one value for many events, like the cart token or a fixed string. Meta drops later events that share an ID within 48 hours, so a reused ID can throw away real sales.

Watch the format too. Shopify hands out the same order as a plain number in webhooks (5512345678) and as a gid://shopify/Order/5512345678 string in its GraphQL API. Meta needs an exact match, so pick one format and use it on both sides.

Step 2: Send the ID from the browser

In the Meta Pixel, the event ID is the fourth argument of fbq, in an object with the key eventID. In a Shopify custom pixel (Settings → Customer events), a Purchase with the order ID as its event ID looks like this:

analytics.subscribe("checkout_completed", (event) => {
  const checkout = event.data.checkout;
  fbq("track", "Purchase", {
    value: checkout.totalPrice?.amount,
    currency: checkout.currencyCode,
  }, { eventID: checkout.order?.id });
});

For other events, use event.id the same way, and include it in whatever your pixel sends to your server. If you’re coming from the old Additional Scripts box, this guide to the checkout upgrade shows how the rest of a custom pixel fits together.

To check the browser side, open your store with the browser’s Network tab filtered to facebook.com/tr. Each request is one event. The eid parameter is the event ID that went out. If it’s missing, Meta has nothing to match on.

Step 3: Send the same ID from the server

On the server, event_id sits next to event_name in each event of the Conversions API request:

{
  "data": [
    {
      "event_name": "Purchase",
      "event_time": 1795243200,
      "event_id": "5512345678",
      "action_source": "website",
      "event_source_url": "https://yourstore.com/checkouts/c/abc/thank-you",
      "user_data": { "fbp": "fb.1.1795240000000.123456789", "fbc": "fb.1.1795230000000.AbCd" },
      "custom_data": { "value": 49.0, "currency": "USD" }
    }
  ]
}

Three things to check on this side:

  1. event_name is spelled exactly like the browser’s event name.
  2. event_id is the same string the browser sent, in the same format.
  3. The server sends within 48 hours of the browser event. Meta’s 7-day limit on event_time is about whether it accepts the event at all, not whether it deduplicates it.

If you retry a failed send, retry with the same event_id. A retry with a fresh ID is a second event as far as Meta is concerned.

Step 4: Check the Event Deduplication tab

In Events Manager, open your pixel’s Overview, click Event details on an event such as Purchase, and go to the Event Deduplication tab. Meta moves its labels around now and then, but you’re looking for two numbers:

  • Rate of events deduplicated: the share of each source’s events Meta merged. Higher is better, and Meta shows a warning when it’s too low.
  • Rate of deduplication key usage: the share of events from each source carrying an event ID, plus an Overlap figure. Low overlap means one source sends no IDs, or the IDs don’t match.

Don’t worry about the Overview chart. It counts events before deduplication, so browser and server both looking full isn’t double counting. Give new events about 20 minutes to show up, and judge the rates over a few days, not one order.

The final check is the one that matters for ad numbers: compare a week of Purchase events with your Shopify orders for the same week. Why Meta shows a different number of purchases than Shopify explains how to compare them fairly.

Why deduplication still fails

Symptom Cause Fix
Purchases near double orders Two tools send Purchase Turn one off
Low overlap One side sends no ID Add the ID
Low dedup rate IDs differ One ID, one format
Some orders doubled Server sends after 48 hours Send sooner
Real sales missing One ID reused Unique IDs
Pairs never merge Names differ Same name

Where SuperPixel fits

SuperPixel is the tracking app I build for Shopify stores. It installs its own pixel through Shopify’s customer events, so there’s no theme code to edit. Events go from Shopify’s pixel sandbox to SuperPixel’s server and then to Meta’s Conversions API, as PageView, ViewContent, AddToCart, InitiateCheckout and Purchase, with the order ID on purchases.

For its own events, it covers two points from this article. Each event is sent with a stable event ID that doesn’t change when it’s retried, so a retry reaches Meta as the same event, not a new one. And every Purchase is matched to Shopify’s paid order, so a reloaded thank-you page or a shopper coming back from a payment provider becomes one purchase, not two. The Live Events page shows the latest events, which pixels each went to, and why one wasn’t sent.

What it won’t do is merge with events from anything else. Its IDs don’t match the Facebook & Instagram app’s, a custom pixel’s or another app’s, so if those keep sending Purchase to the same pixel, Meta counts those sales twice. You have to switch them off yourself. If you’d rather have browser and server events paired by one tool, the Facebook & Instagram app’s data sharing does that, and this comparison can help you choose.

FAQ

Is event_id required in the Conversions API?

No, Meta marks it as optional. But without it, a browser event and its server twin can only be merged through fbp or external_id, which only works when the browser event arrives first. Send it whenever the same event has two sources.

Can I use the same event ID for all events in one order?

No. Use a different ID for each event. The event name is part of the match, so a Purchase and an InitiateCheckout sharing an ID won’t cancel each other, but two Purchases sharing one can be merged into one. That’s what you want for a duplicate and a problem for two real orders.

Should the event ID be the order ID or the order number?

Either works if both sides send the same one. The order ID is the safer pick: the order number is what shoppers see (#1001), and stores can add a prefix or suffix to it, which is one more thing that can differ between your pixel and your server.

Why is my deduplication rate low even though I send event IDs?

Usually the two sides don’t produce the same string: one uses the order number and the other the order ID, one adds a prefix, or one side generates its own random ID. Compare the eid in the browser’s Network tab with the event_id your server logs for the same order.

How long until Events Manager reflects a fix?

New events show up within about 20 minutes. Give the deduplication rates two or three days of new events before deciding the fix worked, since one test order barely moves them.

Try it on your store

If you’d like one server-side source with stable event IDs and one Purchase per order, you can try SuperPixel free on your first 5 purchases. It’s $29 a month or $232 a year once those are used, billed through Shopify. Turn off the other sources sending to the same pixel first. Questions about your setup? Email me at hello@superpixel.app.