@widergy/mobile-ui 1.21.1 → 1.23.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 +22 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.23.0](https://github.com/widergy/mobile-ui/compare/v1.22.0...v1.23.0) (2024-09-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* new group analytics ([#353](https://github.com/widergy/mobile-ui/issues/353)) ([5e92053](https://github.com/widergy/mobile-ui/commit/5e9205301595aec17e6257b47e746f07d0c5fbdd))
|
|
7
|
+
|
|
8
|
+
# [1.22.0](https://github.com/widergy/mobile-ui/compare/v1.21.1...v1.22.0) (2024-08-30)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* adds intercom related functions ([#351](https://github.com/widergy/mobile-ui/issues/351)) ([b85946f](https://github.com/widergy/mobile-ui/commit/b85946f2a3d1bfc8d255ed988aea9f5b3999ca31))
|
|
14
|
+
|
|
1
15
|
## [1.21.1](https://github.com/widergy/mobile-ui/compare/v1.21.0...v1.21.1) (2024-08-29)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -102,6 +102,14 @@ export const mixpanelSuperPropertiesRegister = mixpanelInstance => superProperti
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
+
export const mixpanelGroupProfileSet = mixpanelInstance => (groupKey, groupId, profileName) => {
|
|
106
|
+
if (mixpanelInstance) {
|
|
107
|
+
const mixpanelGetGroup = mixpanelInstance.getGroup(groupKey, groupId);
|
|
108
|
+
mixpanelGetGroup.set('$distinct_id', groupId);
|
|
109
|
+
mixpanelGetGroup.set('$name', profileName);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
105
113
|
export const singleFirebaseEvent = analyticsIntance => eventData => {
|
|
106
114
|
const { action, category, currency, label, value } = eventData;
|
|
107
115
|
if (analyticsIntance) analyticsIntance.logEvent(category, { action, currency, label, value });
|
|
@@ -123,9 +131,21 @@ export const singleEventMultitracking = (trackers, eventDefinitions) => (name, e
|
|
|
123
131
|
});
|
|
124
132
|
};
|
|
125
133
|
|
|
134
|
+
export const intercomSingleEvent = trackEventFunction => eventData => {
|
|
135
|
+
const { name, ...eventMetadata } = eventData;
|
|
136
|
+
if (trackEventFunction) trackEventFunction(name, eventMetadata);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export const intercomUpdateUser = updaterFunction => userProperties => {
|
|
140
|
+
updaterFunction(userProperties);
|
|
141
|
+
};
|
|
142
|
+
|
|
126
143
|
export default {
|
|
127
144
|
createAnalyticsMiddleware,
|
|
145
|
+
intercomSingleEvent,
|
|
146
|
+
intercomUpdateUser,
|
|
128
147
|
mixpanelEventsFlush,
|
|
148
|
+
mixpanelGroupProfileSet,
|
|
129
149
|
mixpanelPeopleSet,
|
|
130
150
|
mixpanelSuperPropertiesRegister,
|
|
131
151
|
mixpanelUserIdentify,
|
|
@@ -136,7 +156,7 @@ export default {
|
|
|
136
156
|
singleFirebaseEvent,
|
|
137
157
|
singleInhouseEvent,
|
|
138
158
|
singleMixpanelEvent,
|
|
139
|
-
tracker,
|
|
140
159
|
trackEvent,
|
|
141
|
-
trackScreen
|
|
160
|
+
trackScreen,
|
|
161
|
+
tracker
|
|
142
162
|
};
|
package/package.json
CHANGED