From 01abbae28010f70bf8919315d1ab0b0d74639295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Viricel?= <38253764+wazolab@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:45:27 +0100 Subject: [PATCH] Add new tracking events (#444) --- README.md | 6 ++-- components/Isochrone/IsochroneTrigger.vue | 43 ++++++++++++++++++++--- components/Map/MapControlsBackground.vue | 7 ++-- components/PoisCard/PoiCardContent.vue | 12 ++++++- composables/useIsochrone.ts | 4 +-- lib/tracker-google.ts | 22 +++++++++++- lib/tracker-matomo.ts | 25 +++++++++++-- lib/trackers.ts | 15 ++++++-- 8 files changed, 116 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 080d20b86..600d0b962 100644 --- a/README.md +++ b/README.md @@ -188,12 +188,14 @@ Special formatting support: | Seach query | search_query | | | | trackSiteSearch | query | | Selecting a search result | search_result_event | | search_result_event | type, title | trackEvent | event, action, title, resultType | | Opening the popup | popup | | pageview | pageTitle, pageLocation, pagePath, poiId | trackPageView | title, Url | -| Action on the popup | popup_event | details, route, explore, favorite, zoom | popup_event | action, title, poiId, category | trackEvent | event, action, title, poiId | -| Action on the map control | map_control_event | 3d, background, explorer, favorite | map_control_event | action | trackEvent | event, action | +| Action on the popup | popup_event | details, route, explore, favorite, zoom, isochrone | popup_event | action, title, poiId, category | trackEvent | event, action, title, poiId | +| Action on the map control | map_control_event | 3d, explorer, favorite | map_control_event | action | trackEvent | event, action | +| Action on the map background control | map_control_event | background | map_control_event | action, background | trackEvent | event, action, background | | Action on favorites | favorites_event | open_share, copy_link, exportPDF, exportCSV | favorites_event | action | trackEvent | event, action | | Notebook | notebook_event | open | pageview | pageTitle, pagePath | trackPageView | title, Url | | External links | external_link | | external_link | Url, title | trackLink | Url | | Action on details page | details_event | favorite | details_event | action, title, poiId | trackEvent | event, action, title, poiId | +| Select isochrone profile | isochrone_event | select_profile | isochrone_event | action, profile | trackEvent | event, action, profile | Note on Matomo. `Origin` is a set as dimension `1` and should be configured as is on Matomo. diff --git a/components/Isochrone/IsochroneTrigger.vue b/components/Isochrone/IsochroneTrigger.vue index 569b4ae7a..7e363f45e 100644 --- a/components/Isochrone/IsochroneTrigger.vue +++ b/components/Isochrone/IsochroneTrigger.vue @@ -1,5 +1,6 @@ {{ t(`isochrone.profiles.${profiles.foot}`) }} - + - {{ t(`isochrone.profiles.${profiles.cycle}`) }} + {{ t(`isochrone.profiles.${profiles.bicycle}`) }}