Update matomo event names

Relates to MS-732
This commit is contained in:
Ramon Wenger 2023-06-29 15:47:06 +02:00
parent 02e526c1de
commit 3f308d9a32
2 changed files with 9 additions and 15 deletions

View File

@ -68,15 +68,9 @@ import { sanitize } from '@/helpers/text';
import { defineAsyncComponent } from 'vue'; import { defineAsyncComponent } from 'vue';
import { matomoTrackEvent } from '@/helpers/matomo-client'; import { matomoTrackEvent } from '@/helpers/matomo-client';
const SubmissionForm = defineAsyncComponent(() => const SubmissionForm = defineAsyncComponent(() => import('@/components/content-blocks/assignment/SubmissionForm.vue'));
import('@/components/content-blocks/assignment/SubmissionForm.vue') const Solution = defineAsyncComponent(() => import('@/components/content-blocks/Solution.vue'));
); const SpellCheck = defineAsyncComponent(() => import('@/components/content-blocks/assignment/SpellCheck.vue'));
const Solution = defineAsyncComponent(() =>
import('@/components/content-blocks/Solution.vue')
);
const SpellCheck = defineAsyncComponent(() =>
import('@/components/content-blocks/assignment/SpellCheck.vue')
);
export default { export default {
props: ['value'], props: ['value'],
@ -192,7 +186,7 @@ export default {
this._save(this.assignment.submission); this._save(this.assignment.submission);
if (this.assignment.submission.text.length > 0) { if (this.assignment.submission.text.length > 0) {
matomoTrackEvent('Auftrag', 'Text mit Eingabe gespeichert', this.assignment.id); matomoTrackEvent('Auftrag', 'Text mit Eingabe gespeichert', this.assignment.title);
} }
}, },
changeDocumentUrl(documentUrl) { changeDocumentUrl(documentUrl) {
@ -215,7 +209,7 @@ export default {
}, },
}, },
}); });
matomoTrackEvent('Auftrag', 'Ergebnis mit Lehrperson geteilt', this.assignment.id); matomoTrackEvent('Auftrag', 'Ergebnis mit Lehrperson geteilt', this.assignment.title);
}, },
reopen() { reopen() {
this.$apollo.mutate({ this.$apollo.mutate({
@ -265,7 +259,7 @@ export default {
.then(() => { .then(() => {
this.spellcheckLoading = false; this.spellcheckLoading = false;
}); });
matomoTrackEvent('Auftrag', 'Rechtschreibung geprüft', this.assignment.id); matomoTrackEvent('Auftrag', 'Rechtschreibung geprüft', this.assignment.title);
}, },
}, },

View File

@ -118,7 +118,7 @@ export default {
mounted() { mounted() {
if (this.surveyData) { if (this.surveyData) {
this.loadSurveyFromServer(this.surveyData); this.loadSurveyFromServer(this.surveyData);
matomoTrackEvent('Übung', 'Übung angezeigt', this.id); matomoTrackEvent('Übung', 'Übung angezeigt', this.title);
} }
}, },
@ -202,10 +202,10 @@ export default {
}, },
}); });
if (exit) { if (exit) {
matomoTrackEvent('Übung', 'Übung erfolgreich abgeschlossen', this.id); matomoTrackEvent('Übung', 'Übung erfolgreich abgeschlossen', this.title);
this.$router.go(-1); this.$router.go(-1);
} else { } else {
matomoTrackEvent('Übung', 'Übungsschritt abgeschlossen', this.id); matomoTrackEvent('Übung', 'Übungsschritt abgeschlossen', this.title);
} }
}; };