Skip to main content
Userpilot ReactNative SDK enables you to capture user insights and deliver personalized in-app experiences in real time. With just a one-time setup, you can immediately begin leveraging Userpilot’s analytics and engagement features to understand user behaviors and guide their journeys in-app. This document provides a step-by-step walkthrough of the installation Userpilot device mode support to your applications via this plugin for Analytics-ReactNative.

Installation

You need to install the @userpilot/segment-react-native and the @userpilot/react-native dependency. Userpilot segment react native latest version Check Userpilot ReactNative SDK for more details.
Run pod install after the installation to autolink the Userpilot SDK.

Initialization

In your code where you initialize the analytics client call the .add(plugin) method with an UserpilotPlugin instance:

Configurations (Optional)

Your events will now begin to flow to Userpilot in device mode.

Userpilot SDK callbacks

To gain full control and utilize the full capabilities of the Userpilot SDK in a React Native environment, you can start listening to Userpilot events using the startListeningToUserpilotEvents function from @userpilot/segment-react-native. For example, to handle deep links and other SDK-triggered events, you can implement the appropriate event callbacks like this: