From 7cc395e055d8597ccbbf288ef2bd84ceea5e8a92 Mon Sep 17 00:00:00 2001 From: Marcel Schneider Date: Tue, 10 Apr 2018 12:30:19 +0200 Subject: [PATCH] Track way of changing the day --- src/App.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9169eaf..cae0a39 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,8 +10,8 @@ @@ -50,6 +50,14 @@ export default { } }, methods: { + swipeNext() { + window._paq.push(['trackEvent', 'Navigation', 'NextDay', 'swipe']) + this.nextDay() + }, + swipePrevious() { + window._paq.push(['trackEvent', 'Navigation', 'PreviousDay', 'swipe']) + this.previousDay() + }, previousDay() { this.when === 1 ? (this.when = 6) : this.when-- }, @@ -98,12 +106,19 @@ export default { case 37: if (vm.selWhen !== document.activeElement) { // increment only if selection is not focused, avoid double execution + window._paq.push([ + 'trackEvent', + 'Navigation', + 'PreviousDay', + 'arrow' + ]) vm.previousDay() } break case 39: if (vm.selWhen !== document.activeElement) { // increment only if selection is not focused, avoid double execution + window._paq.push(['trackEvent', 'Navigation', 'NextDay', 'arrow']) vm.nextDay() break }