@widergy/mobile-ui 1.20.0 → 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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
|
|
1
8
|
# [1.20.0](https://github.com/widergy/mobile-ui/compare/v1.19.7...v1.20.0) (2024-08-28)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -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
|
};
|
|
@@ -122,6 +126,7 @@ export const singleEventMultitracking = (trackers, eventDefinitions) => (name, e
|
|
|
122
126
|
export default {
|
|
123
127
|
createAnalyticsMiddleware,
|
|
124
128
|
mixpanelEventsFlush,
|
|
129
|
+
mixpanelPeopleSet,
|
|
125
130
|
mixpanelSuperPropertiesRegister,
|
|
126
131
|
mixpanelUserIdentify,
|
|
127
132
|
mixpanelUserReset,
|
package/package.json
CHANGED