-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
46 lines (42 loc) · 1.45 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { NativeModules } from 'react-native';
var UMAnalyticsModule = NativeModules.UMAnalyticsModule;
export default class Analytics {
static profileSignOff(){
UMAnalyticsModule.profileSignOff()
}
static onEvent(eventname){
UMAnalyticsModule.onEvent(eventname);
}
static onEventWithLabel(eventname, label){
UMAnalyticsModule.onEventWithLabel(eventname, label);
}
static onEventWithMap(eventname, jsonData){
UMAnalyticsModule.onEventWithMap(eventname, jsonData);
}
static onEventWithMapAndCount(eventname, jsonData, count){
UMAnalyticsModule.onEventWithMapAndCount(eventname, jsonData, count);
}
static onTrack(trackname){
UMAnalyticsModule.track(trackname);
}
static onTrackWithMap(trackname, jsonData){
UMAnalyticsModule.trackWithMap(trackname, jsonData);
}
static registerSuperProperty(jsonData){
UMAnalyticsModule.registerSuperProperty(jsonData);
}
static clearSuperProperties(){
UMAnalyticsModule.clearSuperProperties();
}
static setFirstLaunchEvent(eventArray){
UMAnalyticsModule.setFirstLaunchEvent(eventArray);
}
static onPageBegin(pageName) {
//UMAnalyticsModule.onPageBegin(pageName);
UMAnalyticsModule.onEventWithLabel(pageName, "1");
}
static onPageEnd(pageName) {
//UMAnalyticsModule.onPageEnd(pageName);
UMAnalyticsModule.onEventWithLabel(pageName, "0");
}
}