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 CHANGED
@@ -16,6 +16,7 @@ export var ENDPOINTS = {
16
16
  }
17
17
 
18
18
  export var EVENTS = {}
19
+ export var EVENTS_MIXPANEL = {}
19
20
 
20
21
  export var SPECIAL_EVENTS = ['picture_upload', 'write_prompt', 'picture_generated', 'paywall_view']
21
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.0.170",
3
+ "version": "1.0.171",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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 {