react-native-tapdb-analytics
v0.1.3
Published
TapDB Analytics for React Native
Downloads
4
Maintainers
Readme
React Native TapDB Analytics
Installation
$ npm install react-native-tapdb-analytics --save
$ react-native link react-native-tapdb-analytics
Usage
Import
import TapDBAnalytics from 'react-native-tapdb-analytics';
Initialization
TapDBAnalytics.init(appId: string, channel: string, version: string);
Apis
TapDBAnalytics.setUser(userId: string, userType: number, userSex: number, userAge: number, userName: string);
// userType: one of [TapDBAnalytics.UserTypeRegistered, TapDBAnalytics.UserTypeAnonymous]
// userSex: one of [TapDBAnalytics.UserSexMale, TapDBAnalytics.UserSexFemale, TapDBAnalytics.UserSexUnknown]
TapDBAnalytics.setLevel(level: number);
TapDBAnalytics.setServer(server: string);
TapDBAnalytics.onChargeRequest(orderId: string, product: string, amount: number, currencyType: string, virtualCurrencyAmount: number, payment: string);
TapDBAnalytics.onChargeSuccess(orderId: string);
TapDBAnalytics.onChargeFail(orderId: string, reason: string);
TapDBAnalytics.onChargeOnlySuccess(orderId: string, product: string, amount: number, currencyType: string, virtualCurrencyAmount: number, payment: string);