Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

De-duplication not working in FacebookAppEventsPlugin #927

Open
ebeigarts opened this issue Mar 12, 2024 · 1 comment
Open

De-duplication not working in FacebookAppEventsPlugin #927

ebeigarts opened this issue Mar 12, 2024 · 1 comment
Labels
bug Something isn't working 🚧 Work In Progress

Comments

@ebeigarts
Copy link

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:

How to set up app events

Example of 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"])
@ebeigarts ebeigarts added the bug Something isn't working label Mar 12, 2024
@oscb
Copy link
Contributor

oscb commented Mar 18, 2024

Thanks for the report. I'm releasing a fix for this later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🚧 Work In Progress
Projects
None yet
Development

No branches or pull requests

2 participants