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.
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)
Parameter | Type | Description |
---|---|---|
logging | Boolean | Enable or Disable logs for SDK Default: false |
disableRequestPushNotificationsPermission | Boolean | Disable request push notifications permission by SDK. Default: false |
useInAppBrowser | Boolean | configuration to indicate when to open the URL inside CustomTabsIntent or not. Default: false |
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 thestartListeningToUserpilotEvents
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: