Skip to content

Filum-AI/filum-react-native

Repository files navigation

Filum React-Native

A React-Native client for Filum

Installation

  • 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

Usage

  • 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

License

Released under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors