import type { ConsentStore } from "~/types"; export default defineNuxtRouteMiddleware(_to => { const consentStore = useCookie('consent-store').value as ConsentStore; const analytics = consentStore?.analytics; if (import.meta.client && analytics && window._paq) { // window._paq.push(['trackPageView']); } });