From 266a0ac89c4878ebcac7f4a8d3ae2a683f9a38f1 Mon Sep 17 00:00:00 2001 From: Baptiste Maurel Date: Wed, 30 Aug 2023 17:13:10 +0200 Subject: [PATCH] feat: tout les `trackEvent` sont maintenant fait avec `Piwik.getTracker` (#3934) --- src/components/action-buttons.vue | 7 +++---- src/plugins/state-service.ts | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/action-buttons.vue b/src/components/action-buttons.vue index ca9f190489..549b1387e9 100644 --- a/src/components/action-buttons.vue +++ b/src/components/action-buttons.vue @@ -61,12 +61,11 @@ const localOnSubmit = (event) => { } const goBack = () => { - window._paq?.push([ - "trackEvent", + window.Piwik?.getTracker()?.trackEvent( "Parcours", "Bouton précédent", - route.fullPath, - ]) + route.fullPath + ) const answerIndex = getAnswerIndexByPath( store.simulation.answers.current, route.fullPath diff --git a/src/plugins/state-service.ts b/src/plugins/state-service.ts index 8722664668..926337d369 100644 --- a/src/plugins/state-service.ts +++ b/src/plugins/state-service.ts @@ -24,7 +24,7 @@ const StateService = { action: "Navigation cancelled", label: failure.toString(), }, - this.$matomo + window.Piwik?.getTracker() ) } else { throw new Error(failure)