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

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

Notification listeners

Notification listeners let you programmatically observe and act on various events that occur within the SDK in Optimizely Feature Experimentation.

Notification listeners

  • give you flexibility in implementing custom integrations with analytics providers.
  • let you configure integrations by passing data to external services.
  • work by triggering a callback function that you define.

Use cases

The following are a few example use cases for notification listeners:

  • Send data to an analytics service and report feature flag decision data. For example, report that user_123 was assigned to variation A.
  • Use SDK events to send alerts to data monitoring tools like New Relic and Datadog to visualize how A/B tests affect service-level metrics.
  • Pass all events to an external data tier, like a data warehouse, for additional processing and to leverage business intelligence tools.
  • Re-initialize your SDK to quickly retrieve updated feature flag configuration data for your business-critical features.

Notification listeners

Notification listeners in Feature Experimentation work by triggering a callback function that you define and provide at runtime. The following methods or lifecycle events trigger notification listeners if you have implemented the listener: