@widergy/mobile-ui 1.22.0 → 1.23.1
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 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.23.1](https://github.com/widergy/mobile-ui/compare/v1.23.0...v1.23.1) (2024-09-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* instance validation added ([#352](https://github.com/widergy/mobile-ui/issues/352)) ([6f2d5da](https://github.com/widergy/mobile-ui/commit/6f2d5da7771e61736eb602f9de080acffb48a63b))
|
|
7
|
+
|
|
8
|
+
# [1.23.0](https://github.com/widergy/mobile-ui/compare/v1.22.0...v1.23.0) (2024-09-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* new group analytics ([#353](https://github.com/widergy/mobile-ui/issues/353)) ([5e92053](https://github.com/widergy/mobile-ui/commit/5e9205301595aec17e6257b47e746f07d0c5fbdd))
|
|
14
|
+
|
|
1
15
|
# [1.22.0](https://github.com/widergy/mobile-ui/compare/v1.21.1...v1.22.0) (2024-08-30)
|
|
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,13 +131,13 @@ export const singleEventMultitracking = (trackers, eventDefinitions) => (name, e
|
|
|
123
131
|
});
|
|
124
132
|
};
|
|
125
133
|
|
|
126
|
-
export const intercomSingleEvent =
|
|
134
|
+
export const intercomSingleEvent = intercomInstance => eventData => {
|
|
127
135
|
const { name, ...eventMetadata } = eventData;
|
|
128
|
-
if (
|
|
136
|
+
if (intercomInstance) intercomInstance.logEvent(name, eventMetadata);
|
|
129
137
|
};
|
|
130
138
|
|
|
131
|
-
export const intercomUpdateUser =
|
|
132
|
-
|
|
139
|
+
export const intercomUpdateUser = intercomInstance => userProperties => {
|
|
140
|
+
if (intercomInstance) intercomInstance.updateUser(userProperties);
|
|
133
141
|
};
|
|
134
142
|
|
|
135
143
|
export default {
|
|
@@ -137,6 +145,7 @@ export default {
|
|
|
137
145
|
intercomSingleEvent,
|
|
138
146
|
intercomUpdateUser,
|
|
139
147
|
mixpanelEventsFlush,
|
|
148
|
+
mixpanelGroupProfileSet,
|
|
140
149
|
mixpanelPeopleSet,
|
|
141
150
|
mixpanelSuperPropertiesRegister,
|
|
142
151
|
mixpanelUserIdentify,
|
|
@@ -147,7 +156,7 @@ export default {
|
|
|
147
156
|
singleFirebaseEvent,
|
|
148
157
|
singleInhouseEvent,
|
|
149
158
|
singleMixpanelEvent,
|
|
150
|
-
tracker,
|
|
151
159
|
trackEvent,
|
|
152
|
-
trackScreen
|
|
160
|
+
trackScreen,
|
|
161
|
+
tracker
|
|
153
162
|
};
|
package/package.json
CHANGED