Fix survey title in Matomo events

Resolves MS-770 #complete
This commit is contained in:
Ramon Wenger 2023-08-17 15:56:57 +02:00
parent d37197bd3d
commit ccdf916e83
1 changed files with 4 additions and 6 deletions

View File

@ -1,8 +1,6 @@
<template> <template>
<div class="survey-page"> <div class="survey-page">
<h1 class="survey-page__title"> <h1 class="survey-page__title">{{ title }}</h1>
{{ title }}
</h1>
<div id="survey" /> <div id="survey" />
<solution <solution
@ -201,10 +199,10 @@ export default {
}, },
}); });
if (exit) { if (exit) {
matomoTrackEvent('Übung', 'Übung erfolgreich abgeschlossen', this.title); matomoTrackEvent('Übung', 'Übung erfolgreich abgeschlossen', this.surveyData.title);
this.$router.go(-1); this.$router.go(-1);
} else { } else {
matomoTrackEvent('Übung', 'Übungsschritt abgeschlossen', this.title); matomoTrackEvent('Übung', 'Übungsschritt abgeschlossen', this.surveyData.title);
} }
}; };
@ -263,7 +261,7 @@ export default {
this.surveyData = data.survey; this.surveyData = data.survey;
this.loadSurveyFromServer(data.survey); this.loadSurveyFromServer(data.survey);
const module = data.survey.module; const module = data.survey.module;
matomoTrackEvent('Übung', 'Übung angezeigt', data.survey.title); matomoTrackEvent('Übung', 'Übung angezeigt', this.surveyData.title);
this.$apollo.addSmartQuery('module', { this.$apollo.addSmartQuery('module', {
query: MODULE_QUERY, query: MODULE_QUERY,