From cf0416f25cb3f2ac5fb014271b9630f1bd057f64 Mon Sep 17 00:00:00 2001 From: akhuoa Date: Thu, 21 Aug 2025 17:51:29 +1200 Subject: [PATCH 1/2] Add event tracking for zoom --- src/components/FlatmapVuer.vue | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/components/FlatmapVuer.vue b/src/components/FlatmapVuer.vue index 250cce5a..588245ac 100644 --- a/src/components/FlatmapVuer.vue +++ b/src/components/FlatmapVuer.vue @@ -1270,6 +1270,11 @@ export default { if (this.$refs.pathwaysSelection) { this.$refs.pathwaysSelection.reset() } + + this.trackEvent({ + 'event_name': `portal_maps_zoom`, + 'category': 'reset', + }); } }, /** @@ -1280,6 +1285,11 @@ export default { zoomIn: function () { if (this.mapImp) { this.mapImp.zoomIn() + + this.trackEvent({ + 'event_name': `portal_maps_zoom`, + 'category': 'zoom_in', + }); } }, /** @@ -1290,6 +1300,11 @@ export default { zoomOut: function () { if (this.mapImp) { this.mapImp.zoomOut() + + this.trackEvent({ + 'event_name': `portal_maps_zoom`, + 'category': 'zoom_out', + }); } }, onSelectionsDataChanged: function (data) { @@ -3061,6 +3076,19 @@ export default { setConnectionType: function (type) { this.connectionType = type; }, + /** + * @public + * Function to track events. + * @arg {Object} `data` + */ + trackEvent: function (data) { + const taggingData = { + 'event': 'interaction_event', + 'location': 'flatmap', + ...data, + }; + this.$emit('trackEvent', taggingData); + }, }, props: { /** From 4f81280a6044a16c29864a1f24ea27b25608c8d5 Mon Sep 17 00:00:00 2001 From: akhuoa Date: Fri, 22 Aug 2025 11:13:31 +1200 Subject: [PATCH 2/2] Add event tracking on multiflatmapvuer --- src/components/MultiFlatmapVuer.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/MultiFlatmapVuer.vue b/src/components/MultiFlatmapVuer.vue index 546e9e18..f138a9ed 100644 --- a/src/components/MultiFlatmapVuer.vue +++ b/src/components/MultiFlatmapVuer.vue @@ -91,6 +91,7 @@ :showLocalSettings="showLocalSettings" :showOpenMapButton="showOpenMapButton" :showPathwayFilter="showPathwayFilter" + @trackEvent="trackEvent" /> @@ -565,6 +566,19 @@ export default { let map = this.getCurrentFlatmap(); map.setConnectionType(type); }, + /** + * @public + * Function to track events. + * @arg {Object} `data` + */ + trackEvent: function (data) { + const taggingData = { + 'event': 'interaction_event', + 'location': 'flatmap', + ...data, + }; + this.$emit('trackEvent', taggingData); + }, }, props: { /**