apps-sdk 1.1.2 → 1.1.4
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.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Apps SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"expo-store-review": "~8.0.1",
|
|
31
31
|
"expo-tracking-transparency": "~5.1.1",
|
|
32
32
|
"franc-min": "^6.2.0",
|
|
33
|
-
"mixpanel-react-native": "^3.0.
|
|
33
|
+
"mixpanel-react-native": "^3.0.9",
|
|
34
34
|
"react-native": "0.76.7",
|
|
35
35
|
"react-native-adapty": "^3.3.1",
|
|
36
36
|
"react-native-adjust": "^5.0.2",
|
|
@@ -224,8 +224,8 @@ class PayWall extends React.Component {
|
|
|
224
224
|
const stepNumber = data.eventValue.toString().substring(4);
|
|
225
225
|
MixPanel.trackEvent('Onboarding Screen Viewed', {
|
|
226
226
|
"onboarding_id": config.PAYWALL_DATA.others.on_boarding.dsn_id.toString(),
|
|
227
|
-
"onboarding_total_steps":
|
|
228
|
-
"onboarding_step": stepNumber
|
|
227
|
+
"onboarding_total_steps": 4,
|
|
228
|
+
"onboarding_step": stepNumber,
|
|
229
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});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Mixpanel } from "mixpanel-react-native";
|
|
2
2
|
import * as config from '../../config';
|
|
3
3
|
import Networking from "./Networking";
|
|
4
|
+
import Storage from "./Storage";
|
|
4
5
|
|
|
5
6
|
class MixPanel {
|
|
6
7
|
constructor() {
|
|
@@ -31,7 +32,8 @@ class MixPanel {
|
|
|
31
32
|
|
|
32
33
|
try {
|
|
33
34
|
if (!this.devMode) {
|
|
34
|
-
|
|
35
|
+
const trackingPermissionAnswered = await Storage.getData('TRACKING_PERMISSION_ANSWERED');
|
|
36
|
+
if (config.TRACKING_ACTIVE || !trackingPermissionAnswered) {
|
|
35
37
|
await this.mixpanel.track(eventName, properties);
|
|
36
38
|
config.DEBUG_MODE && console.log(`MixPanel Event tracked: ${eventName} with properties:`, properties);
|
|
37
39
|
} else {
|
|
@@ -100,7 +102,7 @@ class MixPanel {
|
|
|
100
102
|
}
|
|
101
103
|
|
|
102
104
|
try {
|
|
103
|
-
if (!this.devMode) {
|
|
105
|
+
if (!this.devMode && userID) {
|
|
104
106
|
await this.mixpanel.identify(userID);
|
|
105
107
|
config.DEBUG_MODE && console.log('MixPanel User identified:', userID);
|
|
106
108
|
} else {
|
|
@@ -230,7 +230,8 @@ class Networking {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
sendEvent = async (eventType, eventKeyword, eventData={}, forceSend = false) => {
|
|
233
|
-
|
|
233
|
+
const trackingPermissionAnswered = await storage.getData('TRACKING_PERMISSION_ANSWERED');
|
|
234
|
+
if (trackingPermissionAnswered && config.TRACKING_ACTIVE === false && Platform.OS === 'ios' && !forceSend) {
|
|
234
235
|
console.log('Event not sent, tracking is denied (iOS): ', eventType, eventKeyword);
|
|
235
236
|
console.log('Tracking answered: ', config.TRACKING_ANSWERED);
|
|
236
237
|
if (!config.TRACKING_ANSWERED) {
|