Skip to main content
Configure how your app handles navigation, analytics events, and experience lifecycle callbacks. Defines how your app handles deep link routes triggered by Userpilot experiences. Implement this to route users to the appropriate screens or external URLs.
The Userpilot SDK automatically handles navigation for external links if you haven’t implemented UserpilotNavigationDelegate. For complete control over link handling, implement UserpilotNavigationDelegate to customize behavior for all link types. Example Implementation
Assign userpilot.navigationDelegate immediately after initializing the SDK, and keep a strong reference to the delegate because the SDK holds it weakly. Navigation callbacks run on the main thread. In SDK 1.4.0 and later, the latest link received during initialization is held until a delegate is assigned or the next main-queue turn after initialization. If no delegate is assigned, the SDK uses its normal URL-opening behavior. This startup delay does not wait for a router that your app initializes asynchronously; buffer the URL in your delegate if your navigation UI is not ready.

Analytics Listener

Receives callbacks whenever the SDK tracks an event, screen, or identifies a user. Use this to integrate with another analytics tool or log events for debugging.
Example Implementation

Experience Listener

Receives callbacks when experiences start, complete, or are dismissed, and when step state changes. Implement this to forward data to another destination or to react to user actions.
Example Implementation