Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Track notification listener

Describes the track notification listener, which lets you implement additional functionality or system tracking on top of your instrumented Optimizely Feature Experimentation Track API calls.

The track event method triggers this notification listener. Because the Feature Experimentation SDKs queue and batch events, there can be a delay between when the track event method captures an event and when the event is actually sent to Feature Experimentation as part of a batch. For more precise alignment with event batches, see Log event notification listener.

Parameters

The following table lists the information provided to the track notification listener when it is triggered:

fieldtypedescription
event keyStringThe event key as you defined it in the Optimizely app.
user idStringThe user ID.
attributesMapA map of custom key-value string pairs specifying attributes for the user that are used for audience targeting. Non-string values are only supported in the SDK v3.0.0 and above for most SDKs. See SDK compatibility matrix.
event tagsMapA map of custom key-value pairs specifying tags for the tracked event. For more information, see Tag events
eventEventThe event object contains the id, key and experiment ids.

Examples

For code examples, see the following SDK documentation on notification listeners: