1 |
|
2 | import { NativeModules } from 'react-native';
|
3 |
|
4 | const { ExponentAmplitude } = NativeModules;
|
5 |
|
6 | export default {
|
7 | initialize(apiKey: string): void {
|
8 | return ExponentAmplitude.initialize(apiKey);
|
9 | },
|
10 |
|
11 | setUserId(userId: string): void {
|
12 | return ExponentAmplitude.setUserId(userId);
|
13 | },
|
14 |
|
15 | setUserProperties(userProperties: { [string]: any }): void {
|
16 | return ExponentAmplitude.setUserProperties(userProperties);
|
17 | },
|
18 |
|
19 | clearUserProperties(): void {
|
20 | return ExponentAmplitude.clearUserProperties();
|
21 | },
|
22 |
|
23 | logEvent(eventName: string): void {
|
24 | return ExponentAmplitude.logEvent(eventName);
|
25 | },
|
26 |
|
27 | logEventWithProperties(eventName: string, properties: { [string]: any }): void {
|
28 | return ExponentAmplitude.logEventWithProperties(eventName, properties);
|
29 | },
|
30 |
|
31 | setGroup(groupType: string, groupNames: Array<string>): void {
|
32 | return ExponentAmplitude.setGroup(groupType, groupNames);
|
33 | },
|
34 | };
|