apps-sdk 1.1.19 → 1.1.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -48,13 +48,7 @@ class MixPanel {
48
48
 
49
49
  try {
50
50
  if (!this.devMode) {
51
- const trackingPermissionAnswered = await Storage.getData('TRACKING_PERMISSION_ANSWERED');
52
- if (config.TRACKING_ACTIVE || !trackingPermissionAnswered || forceSend) {
53
- await this.mixpanel.track(eventName, properties);
54
- config.DEBUG_MODE && console.log(`MixPanel Event tracked: ${eventName} with properties:`, properties);
55
- } else {
56
- config.DEBUG_MODE && console.log(`MixPanel Event not tracked due to tracking permission: ${eventName} with properties:`, properties);
57
- }
51
+ await this.mixpanel.track(eventName, properties);
58
52
  } else {
59
53
  config.DEBUG_MODE && console.log(`MixPanel Event tracked but not send (DEV_MODE ON): ${eventName} with properties:`, properties);
60
54
  }
@@ -79,15 +73,8 @@ class MixPanel {
79
73
 
80
74
  try {
81
75
  if (!this.devMode) {
82
- const trackingPermissionAnswered = await Storage.getData('TRACKING_PERMISSION_ANSWERED');
83
- if (config.TRACKING_ACTIVE || !trackingPermissionAnswered) {
84
- // const distinctId = await this.getDistinctID();
85
- // const superProperties = { ...properties, distinct_id: distinctId };
86
- await this.mixpanel.registerSuperProperties(properties);
87
- config.DEBUG_MODE && console.log('MixPanel Super Properties registered:', properties);
88
- } else {
89
- config.DEBUG_MODE && console.log('MixPanel Super Properties not registered due to tracking permission:', properties);
90
- }
76
+ await this.mixpanel.registerSuperProperties(properties);
77
+ config.DEBUG_MODE && console.log('MixPanel Super Properties registered:', properties);
91
78
  } else {
92
79
  config.DEBUG_MODE && console.log('MixPanel Super Properties registered but not send (DEV_MODE ON):', properties);
93
80
  }
@@ -104,8 +91,6 @@ class MixPanel {
104
91
 
105
92
  try {
106
93
  if (!this.devMode) {
107
- // const distinctId = await this.getDistinctID();
108
- // const superProperties = { ...properties, distinct_id: distinctId };
109
94
  await this.mixpanel.registerSuperPropertiesOnce(properties);
110
95
  config.DEBUG_MODE && console.log('MixPanel Super Properties appended:', properties);
111
96
  } else {
@@ -239,16 +239,6 @@ class Networking {
239
239
  }
240
240
 
241
241
  sendEvent = async (eventType, eventKeyword, eventData={}, forceSend = false) => {
242
- const trackingPermissionAnswered = await storage.getData('TRACKING_PERMISSION_ANSWERED');
243
- if (trackingPermissionAnswered && config.TRACKING_ACTIVE === false && Platform.OS === 'ios' && !forceSend) {
244
- console.log('Event not sent, tracking is denied (iOS): ', eventType, eventKeyword);
245
- console.log('Tracking answered: ', config.TRACKING_ANSWERED);
246
- if (!config.TRACKING_ANSWERED) {
247
- this.addPendingEvent({eventType, eventKeyword, eventData});
248
- }
249
- return;
250
- }
251
-
252
242
  let finalKeyword = eventKeyword;
253
243
  if (config.EVENTS[finalKeyword]) {
254
244
  if (utils.isSpecialEvent(finalKeyword)) {
@@ -269,7 +259,6 @@ class Networking {
269
259
  config.DEBUG_MODE && console.debug("sendEvent", eventType, finalKeyword, eventData);
270
260
  try {
271
261
  AdJust.trackEventIfExist(finalKeyword);
272
- // MixPanel.trackEventIfExist(finalKeyword, eventData);
273
262
  let eventResponse = await this.request(config.ENDPOINTS.EVENTS_PUSH, {
274
263
  event_name: finalKeyword,
275
264
  event_type: eventType,