apps-sdk 1.1.11 → 1.1.13

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.11",
3
+ "version": "1.1.13",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -40,7 +40,7 @@ class MixPanel {
40
40
  }
41
41
  }
42
42
 
43
- async trackEvent(eventName, properties = {}) {
43
+ async trackEvent(eventName, properties = {}, forceSend = false) {
44
44
  if (!this.mixpanel) {
45
45
  console.log('Mixpanel is not initialized');
46
46
  return;
@@ -49,7 +49,7 @@ class MixPanel {
49
49
  try {
50
50
  if (!this.devMode) {
51
51
  const trackingPermissionAnswered = await Storage.getData('TRACKING_PERMISSION_ANSWERED');
52
- if (config.TRACKING_ACTIVE || !trackingPermissionAnswered) {
52
+ if (config.TRACKING_ACTIVE || !trackingPermissionAnswered || forceSend) {
53
53
  await this.mixpanel.track(eventName, properties);
54
54
  config.DEBUG_MODE && console.log(`MixPanel Event tracked: ${eventName} with properties:`, properties);
55
55
  } else {
@@ -81,10 +81,10 @@ class MixPanel {
81
81
  if (!this.devMode) {
82
82
  const trackingPermissionAnswered = await Storage.getData('TRACKING_PERMISSION_ANSWERED');
83
83
  if (config.TRACKING_ACTIVE || !trackingPermissionAnswered) {
84
- const distinctId = await this.getDistinctID();
85
- const superProperties = { ...properties, distinct_id: distinctId };
86
- await this.mixpanel.registerSuperProperties(superProperties);
87
- config.DEBUG_MODE && console.log('MixPanel Super Properties registered:', superProperties);
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
88
  } else {
89
89
  config.DEBUG_MODE && console.log('MixPanel Super Properties not registered due to tracking permission:', properties);
90
90
  }
@@ -104,10 +104,10 @@ class MixPanel {
104
104
 
105
105
  try {
106
106
  if (!this.devMode) {
107
- const distinctId = await this.getDistinctID();
108
- const superProperties = { ...properties, distinct_id: distinctId };
109
- await this.mixpanel.registerSuperPropertiesOnce(superProperties);
110
- config.DEBUG_MODE && console.log('MixPanel Super Properties appended:', superProperties);
107
+ // const distinctId = await this.getDistinctID();
108
+ // const superProperties = { ...properties, distinct_id: distinctId };
109
+ await this.mixpanel.registerSuperPropertiesOnce(properties);
110
+ config.DEBUG_MODE && console.log('MixPanel Super Properties appended:', properties);
111
111
  } else {
112
112
  config.DEBUG_MODE && console.log('MixPanel Super Properties appended but not send (DEV_MODE ON):', properties);
113
113
  }
@@ -142,10 +142,11 @@ class MixPanel {
142
142
 
143
143
  try {
144
144
  if (!this.devMode) {
145
- const distinctId = await this.getDistinctID();
146
- const userProperties = { [propertyName]: propertyValue, distinct_id: distinctId };
147
- await this.mixpanel.getPeople().set(userProperties);
148
- config.DEBUG_MODE && console.log(`MixPanel User property set: ${propertyName} = ${propertyValue}, distinct_id = ${distinctId}`);
145
+ // const distinctId = await this.getDistinctID();
146
+ // const userProperties = { [propertyName]: propertyValue, distinct_id: distinctId };
147
+ await this.mixpanel.getPeople().set(propertyName, propertyValue);
148
+ config.DEBUG_MODE && console.log(`MixPanel User property set: ${propertyName} = ${propertyValue}`);
149
+ // config.DEBUG_MODE && console.log(`MixPanel User property set: ${propertyName} = ${propertyValue}, distinct_id = ${distinctId}`);
149
150
  } else {
150
151
  config.DEBUG_MODE && console.log(`MixPanel User property set but not send (DEV_MODE ON): ${propertyName} = ${propertyValue}`);
151
152
  }
@@ -13,7 +13,7 @@ class HomeActions {
13
13
  }
14
14
 
15
15
  async itemCallback(itemCallbackFunction) {
16
- console.log("itemCallback", itemCallback);
16
+ console.log("itemCallback", itemCallbackFunction);
17
17
  useQuickActionCallback(action => {
18
18
  if (action) {
19
19
  console.log("action", action);