apps-sdk 1.1.0 → 1.1.2

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.0",
3
+ "version": "1.1.2",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -171,7 +171,7 @@ class PayWall extends React.Component {
171
171
  }
172
172
  }
173
173
  MixPanel.trackEvent('Paywall Plan Selected' ,{
174
- 'plan_type': data.id,
174
+ "plan_type": data.id,
175
175
  });
176
176
 
177
177
  if (this.paywallData && data.id && data.id.length > 0) {
@@ -223,10 +223,10 @@ class PayWall extends React.Component {
223
223
  case data.eventName === 'on_boarding' && data.eventValue.toString().substring(0, 4) === 'step':
224
224
  const stepNumber = data.eventValue.toString().substring(4);
225
225
  MixPanel.trackEvent('Onboarding Screen Viewed', {
226
- 'onboarding_id': config.PAYWALL_DATA.others.on_boarding.dsn_id,
227
- 'onboarding_total_steps': 4,
228
- 'onboarding_step': stepNumber,
229
- 'onboarding_step_keyword': data.eventName + '_' + data.eventValue,
226
+ "onboarding_id": config.PAYWALL_DATA.others.on_boarding.dsn_id.toString(),
227
+ "onboarding_total_steps": "4",
228
+ "onboarding_step": stepNumber.toString(),
229
+ "onboarding_step_keyword": data.eventName + '_' + data.eventValue,
230
230
  });
231
231
  Networking.sendEvent('action', 'onb_tap_continue_' + data.eventValue, {step: data.eventValue, onboarding_id: config.PAYWALL_DATA.others.on_boarding.dsn_id});
232
232
  break;
@@ -20,11 +20,12 @@ class AdJust {
20
20
  const self = this;
21
21
  adjustConfig.setAttributionCallback(function (attribution) {
22
22
  self.attribution = attribution;
23
+ Networking.sendEvent('other', 'adjust_attribution_received', attribution, true);
23
24
  setTimeout(() => {
24
25
  self.sendAttributionData(attribution);
25
26
  }, 30000);
26
27
  });
27
- Adjust.initSdk(adjustConfig)
28
+ Adjust.initSdk(adjustConfig);
28
29
  this.updateAttributionInfo();
29
30
  const lastAdjustInitOk = await storage.getData('lastAdjustInitOk');
30
31
  if (!lastAdjustInitOk || (new Date().getTime() - lastAdjustInitOk) > 600000) {
@@ -57,7 +57,11 @@ class PayWallLogic {
57
57
  "subscription_status": "premium",
58
58
  "plan_type": purchase.productId,
59
59
  });
60
- Mixpanel.identifyUser(data.subs_id);
60
+ if (data.subs_id) {
61
+ Mixpanel.identifyUser(data.subs_id);
62
+ } else {
63
+ console.log('No subs_id in purchaseResp');
64
+ }
61
65
  }
62
66
  }
63
67
  } catch (error) {
@@ -86,7 +90,11 @@ class PayWallLogic {
86
90
  "subscription_status": "premium",
87
91
  "plan_type": purchase.productId,
88
92
  });
89
- Mixpanel.identifyUser(data.subs_id);
93
+ if (data.subs_id) {
94
+ Mixpanel.identifyUser(data.subs_id);
95
+ } else {
96
+ console.log('No subs_id in purchaseResp');
97
+ }
90
98
  } else {
91
99
  console.log('SDK checkSubscription fail')
92
100
  }