apps-sdk 1.0.192 → 1.0.194

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.0.192",
3
+ "version": "1.0.194",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -220,7 +220,14 @@ class PayWall extends React.Component {
220
220
  config.DEBUG_MODE && console.debug('eventTrackScene', data);
221
221
  switch(true) {
222
222
  case data.eventName === 'on_boarding' && data.eventValue.toString().substring(0, 4) === 'step':
223
- Networking.sendEvent('action', 'onb_tap_continue_' + data.eventValue, {step: data.eventValue});
223
+ const stepNumber = data.eventValue.toString().substring(4);
224
+ MixPanel.trackEvent('Onboarding Screen Viewed', {
225
+ 'onboarding_id': config.PAYWALL_DATA.others.on_boarding.dsn_id,
226
+ 'onboarding_total_steps': 4,
227
+ 'onboarding_step': stepNumber,
228
+ 'onboarding_step_keyword': data.eventName + '_' + data.eventValue,
229
+ });
230
+ Networking.sendEvent('action', 'onb_tap_continue_' + data.eventValue, {step: data.eventValue, onboarding_id: config.PAYWALL_DATA.others.on_boarding.dsn_id});
224
231
  break;
225
232
  default:
226
233
  Networking.sendEvent('scene', data.eventName, data || {});
@@ -2,6 +2,7 @@ import {Platform} from "react-native";
2
2
  import Networking from "./Networking";
3
3
  import Storage from "./Storage";
4
4
  import Session from "./Session";
5
+ import Mixpanel from "./MixPanel";
5
6
  import * as config from "../../config";
6
7
 
7
8
  import {
@@ -52,6 +53,11 @@ class PayWallLogic {
52
53
  if (data.source) {
53
54
  Networking.sendEvent('other', 'subscription_from_source', {source: data.source});
54
55
  }
56
+ Mixpanel.superProperties({
57
+ "subscription_status": "premium",
58
+ "plan_type": purchase.productId,
59
+ });
60
+ Mixpanel.identifyUser(data.subs_id);
55
61
  }
56
62
  }
57
63
  } catch (error) {
@@ -76,6 +82,11 @@ class PayWallLogic {
76
82
  if (data.source) {
77
83
  Networking.sendEvent('action', 'subscription_from_source', {source: data.source});
78
84
  }
85
+ Mixpanel.superProperties({
86
+ "subscription_status": "premium",
87
+ "plan_type": purchase.productId,
88
+ });
89
+ Mixpanel.identifyUser(data.subs_id);
79
90
  } else {
80
91
  console.log('SDK checkSubscription fail')
81
92
  }