A React-Native client for Filum
- Use
yarn
:
$ yarn add @react-native-async-storage/async-storage react-native-device-info react-native-uuid filum-react-native
- Use
npm
:
$ npm install --save @react-native-async-storage/async-storage react-native-device-info react-native-uuid filum-react-native
- Always call
filumAnalytics.identify(...)
whenever user sign in/up/sign-out - identify() should be called before track() to incorporate your user_id in any track call.
let Analytics = require('filum-react-native');
export const filumAnalytics = new Analytics(
'<YOUR WRITEKEY HERE>',
{
host: 'https://event.filum.ai',
},
);
// In other files
import { filumAnalytics } from './analytics';
...
filumAnalytics.identify(user_id, {<user properties>});
filumAnalytics.track('Order Completed',
{
name: "Testing item",
stock: 10,
price: 11.5
}
);
You can refer to the example repo Filum React Native Sample App
Released under the MIT license.