You must enable the Advanced Audience Targeting integration before sending events to ODP from Feature Experimentation.
Sending Optimizely Data Platform data and the Advanced Audience Targeting integration are in beta. Apply on the Optimizely beta signup page or contact your Customer Success Manager.
The Optimizely Client extension method,
sendOdpEvent lets you send data directly to the ODP server. You can then use this data to analyze user behavior and optimize experiences across different channels and touchpoints.
sendOdpEvent method to:
- Merge or stitch users together and determine which event is associated with which customer.
- Send various types of events and actions, such as pageviews, clicks, form submissions, and others. You can include additional data to provide more context and information about the event being tracked.
For example, by connecting an email address identifier with a
fs_user_id identifier, you can use the
sendOdpEvent method to send events that are associated with both identifiers. This enables you to track and analyze the behavior of a specific user across different touchpoints and devices.
The Android SDK discards the event immediately if there are any errors (
This table lists the required and optional parameters for the
|type||String||The type of event to be sent. Will be "fullstack" for all Android SDK-generated events if not specified.|
|String||Specifies the subcategory of the event type, which will be used to track the app and user lifecycle.|
|identifiers||HashMap<String, String>||A key-value map of user identifiers.|
|data||HashMap<String, Any>||The event data in a key-value map. The value can be any type (string, number, or boolean.) Null values are allowed, but will be interpreted as empty strings.|
The Android SDK will add default event data to the given data dictionary. The default data values can be overwritten by sending the same key when creating your HashMap.
This method sends event data to the ODP server. It does not provide return values.
val identifiers: MutableMap<String, String> = HashMap() identifiers.put("fs-user-id", "user123") identifiers.put("email", "[email protected]") val data: MutableMap<String, Any> = HashMap() data.put("item", "shirt") data.put("price", 50.00) optimizelyClient.sendODPEvent("fullstack", "purchased", identifiers, data)
Map<String, String> identifiers = new HashMap<>(); identifiers.put("fs_user_id", "user123"); identifiers.put("email", "[email protected]"); Map<String, Object> data = new HashMap<>(); data.put("item", "shirt"); data.put("price", 50.00); optimizelyClient.sendODPEvent("fullstack", "purchased", identifiers, data);
The network calls between your application, the Android SDK, and the ODP server when calling the
sendODPEvent method is demonstrated below:
- Your application calls the
- The Android SDK makes a POST request to ODP.
- ODP responds with acknowledgement or relevant error.
The language/platform source files containing the implementation for Android are available on GitHub.
Updated 25 days ago