@widergy/mobile-ui 1.22.0 → 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 CHANGED
@@ -1,3 +1,10 @@
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
+
1
8
  # [1.22.0](https://github.com/widergy/mobile-ui/compare/v1.21.1...v1.22.0) (2024-08-30)
2
9
 
3
10
 
@@ -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 });
@@ -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
@@ -2,7 +2,7 @@
2
2
  "name": "@widergy/mobile-ui",
3
3
  "description": "Widergy Mobile Components",
4
4
  "author": "widergy",
5
- "version": "1.22.0",
5
+ "version": "1.23.0",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [