Global Best Practices
Deduplicating Events via dedupe_id
If you report the same event through more than one of the Axon Pixel, a site-to-site integration, or the Android/iOS Axon SDK, take steps to deduplicate these events. If you do not deduplicate events that you report to more than one integration, you risk inaccurate reporting as the same user event registers multiple times.
Axon deduplicates events for you if you set a dedupe_id
that has an identical value for each report of the same event.
To deduplicate events reliably, pass the same dedupe_id
to each of your integrations (Axon Pixel, site-to-site integration, or Android/iOS SDK) when you report the event to indicate that the event represents the same user action.
Use any arbitrary alphanumeric string (for example, an order ID or a UUID) as your dedupe_id
.
Pass the same dedupe_id
in each integration.
<script> // Include `dedupe_id` as the optional fourth argument: axon("track", «event-name», «event-data», {"dedupe_id": "«your-dedupe-id»"});</script>
Map<String, Object> options = new HashMap<>();options.put( "dedupe_id", "«your-dedupe-id»" );sdk.getEventService().trackEvent( «event-name», «event-data», options );
sdk.eventService.trackEvent(«event-name», «event-data», mapOf("dedupe_id" to "«your-dedupe-id»"))
sdk.eventService.track(event: "«event-name»", parameters: [«event-data»], options: ["dedupe_id" : "«your-dedupe-id»"])
[sdk.eventService trackEvent: @"«event-name»" parameters: @{«event-data»} options: @{@"dedupe_id" : @"«your-dedupe-id»"}];
Axon merges events with identical dedupe_id
s if they occur within five minutes of each other.
If an event arrives more than five minutes after a previous event with the same dedupe_id
, Axon drops the second event.