apps-sdk 1.0.170 → 1.0.171
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config.js +1 -0
- package/package.json +1 -1
- package/src/libraries/MixPanel.js +10 -0
- package/types/index.d.ts +1 -0
package/config.js
CHANGED
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import {Session} from "./index";
|
|
|
4
4
|
import Constants from "expo-constants";
|
|
5
5
|
import * as Localization from "expo-localization";
|
|
6
6
|
import Networking from "./Networking";
|
|
7
|
+
import {Adjust, AdjustEvent} from "react-native-adjust";
|
|
7
8
|
|
|
8
9
|
class MixPanel {
|
|
9
10
|
constructor() {
|
|
@@ -62,6 +63,15 @@ class MixPanel {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
async trackEventIfExist(eventKeyword, eventData = {}) {
|
|
67
|
+
if (config.EVENTS_MIXPANEL[eventKeyword]) {
|
|
68
|
+
this.trackEvent(eventKeyword, eventData);
|
|
69
|
+
} else {
|
|
70
|
+
console.log("Event not found in MixPanel, not sent: " + eventKeyword);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
65
75
|
isMixpanelInitialized() {
|
|
66
76
|
return this.mixpanel !== null;
|
|
67
77
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -185,6 +185,7 @@ declare module 'apps-sdk' {
|
|
|
185
185
|
identifyUser(userID: string): Promise<void>;
|
|
186
186
|
trackEvent(event: string, properties?: object): Promise<void>;
|
|
187
187
|
isMixpanelInitialized(): boolean;
|
|
188
|
+
trackEventIfExist(eventKeyword: string, eventData?: object): Promise<void>;
|
|
188
189
|
}
|
|
189
190
|
|
|
190
191
|
export class TrackingTransparency {
|