@userpilot/segment-react-native
v1.0.0-beta.2
Published
Segment destination plugin for Userpilot.
Readme
@userpilot/segment-react-native
DestinationPlugin for Userpilot. Wraps @userpilot/react-native.
Installation
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.
Usage
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() });Support
Please use Github issues, Pull Requests, or feel free to reach out to our support team.
