NPM or Yarn

EventNative is packaged and available as an npm module.

Use the following command to add it to your project:

npm
yarn
npm
npm install --save @ksense/eventnative
yarn
yarn add @ksense/eventnative

To initialize EventNative, please use:

const { eventN } = require('@ksense/eventnative');
eventN.init({
key: "[API_KEY]",
...params
});

Please, see the full list of parameters, a key parameter value is required.

Intercepting Segment events

To intercept Segment event it's recommended to initialize interception explicitely rather than use segment_hook parameter

eventN.init({...});
//Create analytics via npm module
const analytics = new Analytics();
//initialize interception explicitely
eventN.interceptAnalytics(analytics);