diff --git a/src/components/ContentBar.vue b/src/components/ContentBar.vue index ed85e957..677504e5 100644 --- a/src/components/ContentBar.vue +++ b/src/components/ContentBar.vue @@ -98,6 +98,7 @@ import { ElRow as Row, ElSelect as Select, } from "element-plus"; +import tagging from '../services/tagging'; export default { name: "ContentBar", @@ -251,6 +252,15 @@ export default { }, 1200); }); //this.contextCardVisible = false; // Hide all context cards when switching viewers + + // GA Tracking + const viewCategory = this.entries.find(entry => entry.id === value); + tagging.sendEvent({ + 'event': 'interaction_event', + 'event_name': `portal_maps_toolbar_viewer_changed`, + 'category': viewCategory?.title || '', + 'location': 'map_toolbar' + }); } }, // setPopper with is needed as the flatmap context card does not have an image and has smaller with diff --git a/src/components/ContextCard.vue b/src/components/ContextCard.vue index 3958ba3f..0a5c671b 100644 --- a/src/components/ContextCard.vue +++ b/src/components/ContextCard.vue @@ -63,7 +63,7 @@
- +
@@ -73,6 +73,7 @@ diff --git a/src/components/SplitFlow.vue b/src/components/SplitFlow.vue index acf08a61..a3f1078c 100644 --- a/src/components/SplitFlow.vue +++ b/src/components/SplitFlow.vue @@ -50,6 +50,7 @@ @connectivity-source-change="onConnectivitySourceChange" @filter-visibility="onFilterVisibility" @connectivity-item-close="onConnectivityItemClose" + @trackEvent="trackEvent" /> (f.facet && f.facet.toLowerCase() !== 'show all')) + .map((f) => f.tagLabel) + .join(', '); + const searchValue = data.query; + + if (filterValues) { + Tagging.sendEvent({ + 'event': 'interaction_event', + 'event_name': 'portal_maps_action_filter', + 'category': filterValues, + 'location': 'map_sidebar_connectivity_filter' + }); + } + + if (searchValue) { + Tagging.sendEvent({ + 'event': 'interaction_event', + 'event_name': 'portal_maps_action_search', + 'category': searchValue, + 'location': 'map_sidebar_connectivity_search' + }); + } } } }, @@ -794,6 +818,9 @@ export default { this.settingsStore.updateGlobalSettings(state.globalSettings); } }, + trackEvent: function (data) { + Tagging.sendEvent(data); + }, }, created: function () { this._facets = []; diff --git a/src/components/viewers/Flatmap.vue b/src/components/viewers/Flatmap.vue index e14cdb4b..9624fec7 100644 --- a/src/components/viewers/Flatmap.vue +++ b/src/components/viewers/Flatmap.vue @@ -39,6 +39,7 @@ @pathway-selection-changed="onPathwaySelectionChanged" @mapmanager-loaded="onMapmanagerLoaded" :showPathwayFilter="false" + @trackEvent="trackEvent" />