Official repository explaining the Braze Debounce Identify()
functionality for customers using both products via direct Segment integration. This codebase is only an example for iOS and Android. For analytics.js
you can directly access similar functionality via source settings as explained here. This contains example code to enable Braze Debounce Identify on mobile client in addition to sample apps to help get you started on iOS and Android.
Middlewares are a powerful mechanism that can augment the events collected by the SDK. A middleware is a simple function that is invoked by the Segment SDK and can be used to monitor, modify or reject events. They are available across all analytics-{ ios | android | js}
Segment customers are not charged for duplicate identify()
calls hence default client app and Segment SDK behavior is to aggresively call this endpoint. Braze on the other hand is priced such that customers are charged per data point stored (incuding duplicates). To help customers avoid overage, this middleware was built to avoid sending duplicate user traits to Braze on every identify()
call inside Segment.
The core functionality that this middleware adds can be explained with the following pseudo-code:
if payload is IdentityPayload {
if payload.userId != lastUserID or
payload.anonymousId != lastAnonymousID or
payload.traits != lastTraits {
// do nothing, it'll get sent like normal.
} else {
removeBrazeFromDestinationList()
}
}
The illustration below further elaborates upon this logic:
Yes. This middleware works under both cloud and device modes for the Segment<>Braze integration. There is not confguration or implementation burden on you and the Segment libraries take care of this internally.
You can follow our platform specific guides to help you add this middleware to your native mobile projects:
For your Website sources of type Javascript or Project under Segment please follow directions here.
Please contact us for more information on this middleware, or if you have further questions.