Skip to main content
Configure how your app handles navigation, analytics events, and experience lifecycle callbacks. Triggered when a deep link is invoked from an experience or push notification. Parameters:
  • url: String – The custom deep link URL that should be handled by the host (client) app.

Analytics Listener

Triggered when the client app reports an analytics event to the SDK. Parameters:
  • analytic: String – The name or type of the analytic event ("Identify", "Screen", "Event").
  • value: String – The value associated with the event.
  • properties: Map<String, Any> – Additional key-value pairs providing context for the event.

Experience Listener

Provides callbacks related to the lifecycle of experiences and their steps within the SDK. Callbacks onExperienceStateChanged(id: Int, state: String) Called when the overall state of an experience changes.
  • id: Experience ID (optional)
  • state: New state — "Started", "Completed", "Dismissed", "Skipped", or "Submitted"
  • experienceType: "Flow", "Survey", or "NPS"
onExperienceStepStateChanged(id: Int, state: String, experienceId: Int, step: Int, totalSteps: Int) Called when the state of a specific step in an experience changes.
  • id: Step ID
  • state: New step state — "Started", "Completed", "Dismissed", "Skipped", or "Submitted"
  • experienceId: Associated experience ID
  • experienceType: "Flow", "Survey", or "NPS"
  • step: Current step index (optional)
  • totalSteps: Total number of steps in the experience (optional)
Note: Both onExperienceStateChanged and onExperienceStepStateChanged events are sent under the key UserpilotExperienceEvent.

Implementation Example