diff --git a/src/components/CookieConsentBtn.vue b/src/components/CookieConsentBtn.vue index dc7f033..55ecbdf 100644 --- a/src/components/CookieConsentBtn.vue +++ b/src/components/CookieConsentBtn.vue @@ -50,13 +50,12 @@ export default { consent.value = true } - const hasConsentGiven = () => { + onMounted(() => { + window._paq.push(['requireCookieConsent']); + window._paq.push(['trackPageView']); + if (cookies.get('consent') === 'given') consent.value = true - } - - onMounted(() => { - hasConsentGiven() }) return {handleConsent, handleConsentForget, tracking, consent} @@ -65,6 +64,9 @@ export default {