matomoRoutes.global.ts 331 B

12345678910
  1. import { ConsentStore } from "~~/types";
  2. export default defineNuxtRouteMiddleware(_to => {
  3. const consentStore = useCookie('consent-store').value as ConsentStore;
  4. const analytics = consentStore?.analytics;
  5. if (process.client && analytics && window._paq) {
  6. // window._paq.push(['trackPageView']);
  7. }
  8. });