analytics-react-native
analytics-react-native copied to clipboard
De-duplication not working in `FacebookAppEventsPlugin`
To avoid duplicate events in FB, FacebookAppEventsPlugin should set event_id as messageId, similar as Segment's Pixel Destination and default conversions api mapping, by using event_id: messageId.
https://github.com/segmentio/analytics-react-native/blob/master/packages/plugins/plugin-facebook-app-events/src/FacebookAppEventsPlugin.ts#L162-L164
Conversions API for App Events - Documentation - Meta for Developers
The deduplication mechanism will be required to remove duplicate event traffic between the Conversions API integration and all other existing integrations you have with app events including SDK, MMPs and App Events API.
For app events, we apply the same deduplication functionality that exists for web events. The logic leverages the field event_id and event_name based deduplication (Conversions API and SDK / App Events API events that carry the same event_id). The event_id parameter is an identifier that can uniquely distinguish between similar events. Inaccurate event IDs may cause your conversion to be wrongly deduplicated, further impacting conversion reporting and campaign performance.
You can refer to the following developer documentation to implement the deduplication setup:
Here is an example of how to log a custom event. To do so, pass the name of the event as an in iOS SDK:
AppEvents.shared.logEvent(.achievedLevel, parameters: ["event_id": "123"])
Thanks for the report. I'm releasing a fix for this later today.
Hi @ebeigarts apologies for any confusion and/or delay here. Is this still an issue? Oscar mentioned he was planning on fixing it but I'm not certain he released it. Please just let me know and we will prioritize it this sprint. Thanks!
Addressed in #929