Deduplicate Pixel and Server-Side Events

If you are already sending events via Facebook Pixel, there are different ways to add server-side events. For example:

  1. You can send different types of events via Pixel and server-side. For example, you send Purchase events via Pixel, and AddToCart events via server-side. This way, you separate events completed on the person's browser from events completed outside the browser. If you choose this option, you do not need to worry about event deduplication.
  2. You can send all of your events via both Pixel and server-side. For example, you send all Purchase and AddToCart events via both Pixel and server-side. This way, any events missed by the Pixel can be captured via server-side. In this case, see the following instructions so we can deduplicate your events.

Event Deduplication

Facebook tries to deduplicate identical events sent through the Facebook Pixel and the server-side Events API. We determine if events are identical based on their ID and name.

For an event to be deduplicated:

  1. In corresponding events, a Facebook Pixel's eventID must match server-side's event_id.
  2. In corresponding events, a Facebook Pixel's event must match server-side's event_name.

Once your event fulfills both conditions, we keep the first one and remove the following one. If a server and browser event arrive at approximately the same time (within 5 minutes of each other), we favor the browser event.

Best Practices

For better matching, we need accurate information from your events coming through both Pixel and server-side:

  • The eventID inside the optional eventData parameter should be a unique value. Depending on your pixel implementation, you can use:
    • track: send the event for all pixels on the page,
    • trackSingle: send the event for one pixel,
    • an image pixel tag with the eid parameter.
fbq('track', 'Purchase', {value: 12, currency: 'USD'}, {eventID: 'EVENT_ID'});
fbq('trackSingle', 'SPECIFIC_PIXEL_ID', 'Purchase', {value: 12, currency: 'USD'}, {eventID: 'EVENT_ID'});
<img src="https://www.facebook.com/tr?id=PIXEL_ID&event=Purchase&eid=EVENT_ID"/>
  • The eventID from Facebook Pixel must match the event_id in the corresponding event coming from server-side.

  • If we find the same server key combination (event_id, event_name) and browser key combination (eventID, event) sent to the same pixel ID within 48 hours, we discard the subsequent events. There is one exception: if a server and browser event arrive at approximately the same time (within 5 minutes of each other), we favor the browser event.