apps-sdk 1.1.28 → 1.1.30
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
package/src/libraries/AdJust.js
CHANGED
|
@@ -28,10 +28,22 @@ class AdJust {
|
|
|
28
28
|
} catch (error) {
|
|
29
29
|
console.error('Error sending attribution to Adapty:', error);
|
|
30
30
|
}
|
|
31
|
+
config.DEBUG_MODE && console.log('Sending attribution to Mixpanel: ', attribution);
|
|
32
|
+
try {
|
|
33
|
+
MixPanel.setUserProperties({
|
|
34
|
+
network: attribution.network || '',
|
|
35
|
+
campaign: attribution.campaign || '',
|
|
36
|
+
adgroup: attribution.adgroup || '',
|
|
37
|
+
creative: attribution.creative || '',
|
|
38
|
+
trackerToken: attribution.trackerToken || ''
|
|
39
|
+
});
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error('Error sending attribution to Adapty:', error);
|
|
42
|
+
}
|
|
31
43
|
}
|
|
32
44
|
setTimeout(() => {
|
|
33
45
|
self.sendAttributionData(attribution);
|
|
34
|
-
},
|
|
46
|
+
}, 10000);
|
|
35
47
|
});
|
|
36
48
|
adjustConfig.setDeferredDeeplinkCallback(function (deeplink) {
|
|
37
49
|
if (deeplink) {
|
|
@@ -49,6 +49,7 @@ class MixPanel {
|
|
|
49
49
|
try {
|
|
50
50
|
if (!this.devMode) {
|
|
51
51
|
await this.mixpanel.track(eventName, properties);
|
|
52
|
+
config.DEBUG_MODE && console.log(`MixPanel Event tracked: ${eventName} with properties:`, properties);
|
|
52
53
|
} else {
|
|
53
54
|
config.DEBUG_MODE && console.log(`MixPanel Event tracked but not send (DEV_MODE ON): ${eventName} with properties:`, properties);
|
|
54
55
|
}
|
|
@@ -5,6 +5,7 @@ import * as Device from 'expo-device';
|
|
|
5
5
|
import Constants from 'expo-constants';
|
|
6
6
|
import { default as Networking } from './Networking';
|
|
7
7
|
import { default as Storage } from './Storage';
|
|
8
|
+
import MixPanel from "../libraries/MixPanel";
|
|
8
9
|
|
|
9
10
|
class NotificationsPush {
|
|
10
11
|
initialize = async () => {
|
|
@@ -25,6 +26,7 @@ class NotificationsPush {
|
|
|
25
26
|
Notifications.addNotificationResponseReceivedListener(response => {
|
|
26
27
|
console.log('addNotificationResponseReceivedListener',JSON.stringify(response));
|
|
27
28
|
Networking.sendEvent('action', 'click_notification', {"date_notification": response.notification.date, "content": response.notification.request.content});
|
|
29
|
+
MixPanel.trackEvent('Push Notification CTA' ,{ "action": response.notification.request.content.data.action || "", "placement": response.notification.request.content.data.placement || "" });
|
|
28
30
|
Storage.storeData('PUSH_ACTION', response.notification.request.content.data);
|
|
29
31
|
});
|
|
30
32
|
};
|