Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.34 KB

File metadata and controls

42 lines (27 loc) · 1.34 KB

@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-native

Using Yarn:

yarn add @userpilot/segment-react-native @userpilot/react-native

Run 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.