@widergy/mobile-ui 1.19.7 → 1.21.0
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/CHANGELOG.md +14 -0
- package/lib/utils/analyticsUtils/index.js +15 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.21.0](https://github.com/widergy/mobile-ui/compare/v1.20.0...v1.21.0) (2024-08-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* new mixpanel people set method ([#340](https://github.com/widergy/mobile-ui/issues/340)) ([24af64e](https://github.com/widergy/mobile-ui/commit/24af64e08295bb9ab30eab5b1646acd16d2f8762)), closes [#338](https://github.com/widergy/mobile-ui/issues/338)
|
|
7
|
+
|
|
8
|
+
# [1.20.0](https://github.com/widergy/mobile-ui/compare/v1.19.7...v1.20.0) (2024-08-28)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* mixpanel superproperties method ([#337](https://github.com/widergy/mobile-ui/issues/337)) ([10c8881](https://github.com/widergy/mobile-ui/commit/10c8881e1fb1c895b87ece76b48d857e3a641158))
|
|
14
|
+
|
|
1
15
|
## [1.19.7](https://github.com/widergy/mobile-ui/compare/v1.19.6...v1.19.7) (2024-08-27)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -68,17 +68,21 @@ export const multiTracking = trackerArgumentsArray =>
|
|
|
68
68
|
);
|
|
69
69
|
|
|
70
70
|
export const mixpanelUserIdentify = mixpanelInstance => userProfileProperties => {
|
|
71
|
-
const { id } = userProfileProperties;
|
|
71
|
+
const { id, externalId = '' } = userProfileProperties;
|
|
72
72
|
if (mixpanelInstance) {
|
|
73
|
-
mixpanelInstance.identify(`${id}`);
|
|
73
|
+
mixpanelInstance.identify(`${id}${externalId}`);
|
|
74
74
|
mixpanelInstance.getPeople().set({
|
|
75
|
-
$name: `${id}`,
|
|
75
|
+
$name: `${id}${externalId}`,
|
|
76
76
|
$email: null,
|
|
77
77
|
...userProfileProperties
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
+
export const mixpanelPeopleSet = mixpanelInstance => userProfileProperties => {
|
|
83
|
+
if (mixpanelInstance) mixpanelInstance.getPeople().set(userProfileProperties);
|
|
84
|
+
};
|
|
85
|
+
|
|
82
86
|
export const mixpanelUserReset = mixpanelInstance => () => {
|
|
83
87
|
if (mixpanelInstance) mixpanelInstance.reset();
|
|
84
88
|
};
|
|
@@ -92,6 +96,12 @@ export const singleMixpanelEvent = mixpanelInstance => eventData => {
|
|
|
92
96
|
if (mixpanelInstance) mixpanelInstance.track(name, yourProperties);
|
|
93
97
|
};
|
|
94
98
|
|
|
99
|
+
export const mixpanelSuperPropertiesRegister = mixpanelInstance => superProperties => {
|
|
100
|
+
if (mixpanelInstance) {
|
|
101
|
+
mixpanelInstance.registerSuperProperties(superProperties);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
95
105
|
export const singleFirebaseEvent = analyticsIntance => eventData => {
|
|
96
106
|
const { action, category, currency, label, value } = eventData;
|
|
97
107
|
if (analyticsIntance) analyticsIntance.logEvent(category, { action, currency, label, value });
|
|
@@ -116,6 +126,8 @@ export const singleEventMultitracking = (trackers, eventDefinitions) => (name, e
|
|
|
116
126
|
export default {
|
|
117
127
|
createAnalyticsMiddleware,
|
|
118
128
|
mixpanelEventsFlush,
|
|
129
|
+
mixpanelPeopleSet,
|
|
130
|
+
mixpanelSuperPropertiesRegister,
|
|
119
131
|
mixpanelUserIdentify,
|
|
120
132
|
mixpanelUserReset,
|
|
121
133
|
multiTracking,
|
package/package.json
CHANGED