Duplicate purchases in the Pixel and Conversions API: how to deduplicate

Published by the UTM Builder team at Limner.

Meta only merges the Pixel event with the Conversions API event when both arrive with the same name and the same ID. In the browser you send event and eventID; on the server, event_name and event_id. If one side sends a different ID, or none at all, the purchase is counted twice. TikTok works the same way, with event and event_id in the Pixel and in the Events API.

How Meta deduplicates

Meta’s documentation calls the ID method the recommended one. The rules:

In the Pixel, the ID goes in the fourth argument of fbq, separate from the purchase data:

fbq('track', 'Purchase', {value: 197.00, currency: 'BRL'}, {eventID: 'pedido-48213'});

In the Conversions API, the same value goes in the server event:

{"event_name": "Purchase", "event_id": "pedido-48213", ...}

The classic mistake is generating one random ID in the browser and another on the server. Both look right and they never match.

The fbp and external_id method

There’s a second method, which matches event_name along with fbp and/or external_id. The documentation lists its limitations: it generally only works when the event is sent from the browser first and then from the server; the server event isn’t discarded if there was no browser event in the previous 48 hours; and it doesn’t deduplicate when there’s only one source. Two consecutive browser events with the same information are both kept, and the same goes for two server events. Use it as a backup to the ID.

Where duplication comes from in Brazil

The rule that solves almost every case: one browser source and one server source per pixel, with the same ID.

How to check in Events Manager

  1. In the pixel’s Overview, open the details for the Purchase event and go to the Event Deduplication tab.
  2. Read the rate of deduplicated events by source. A low rate triggers a warning.
  3. Read the deduplication key usage. Little overlap points to an ID that isn’t unique, or an ID sent by only one side.
  4. Connection Method shows the channel each event came through. If you see a channel you didn’t expect, there’s a forgotten integration.
  5. Don’t use the Overview count as your number of sales. The documentation says it includes events received before deduplication.
  6. To test, use Test Events (Events Manager, Data sources, your pixel). The server sends the test code in test_event_code, which must be left out of production requests.

Official sources