DestinationPlugin for Userpilot. Wraps @userpilot/react-native.
You need to install the @userpilot/segment-react-native and the @userpilot/react-native dependency.
Using NPM:
npm install --save @userpilot/segment-react-native @userpilot/react-nativeUsing Yarn:
yarn add @userpilot/segment-react-native @userpilot/react-nativeRun pod install after the installation to autolink the Userpilot SDK.
See Userpilot React Native Module for more details of this dependency.
Follow the instructions for adding plugins on the main Analytics client:
In your code where you initialize the analytics client call the .add(plugin) method with an UserpilotPlugin instance:
import { createClient } from '@segment/analytics-react-native';
import { Userpilotlugin } from '@userpilot/segment-react-native';
const segmentClient = createClient({
writeKey: 'SEGMENT_KEY'
});
segmentClient.add({ plugin: new UserpilotPlugin() });Please use Github issues, Pull Requests, or feel free to reach out to our support team.