Issue
Customers using Segment’s Facebook Pixel and Facebook Conversions API (CAPI) destinations may see duplicate Purchase events in Facebook reporting. This happens when the Event ID does not match between the Pixel and CAPI events, causing Facebook’s deduplication to fail.
Product
Twilio Segment
Environment
Segment Console
Cause
Facebook deduplication requires both the event name and Event ID to be identical between Pixel and CAPI events. By default, Segment’s Facebook Pixel destination uses the Segment messageId as the Event ID, while the CAPI destination may use a different value (such as orderId or another transaction identifier). If these values do not match, Facebook will count both events separately, resulting in duplicate Purchase events.
Resolution
To prevent duplicate Purchase events in Facebook:
- Map the Event ID in both destinations to the same value:
- By default, the Pixel destination uses the Segment
messageIdas the Event ID. - Update the Event ID mapping in your server-side CAPI destination to use the same
messageIdgenerated by the client-side event.
- By default, the Pixel destination uses the Segment
- Test your setup to confirm that Facebook is deduplicating events and not double-counting.
Additional Information
If you cannot ensure matching Event IDs between Pixel and CAPI events, Facebook may continue to count duplicate events for the same transaction. For more details, refer to Handling Duplicate Pixel and Conversions API Events