matomo.client.ts 993 B

1234567891011121314151617181920212223242526272829
  1. // <noscript><p><img src="https://merida.morpheu5.net/balmyogre?idsite=1&amp;rec=1" style="border:0;" alt="" /></p></noscript>
  2. import { ConsentStore } from "~~/types";
  3. export default defineNuxtPlugin(_nuxtApp => {
  4. const consentStore = useCookie('consent-store').value as ConsentStore;
  5. const analytics = consentStore?.analytics;
  6. if (analytics || true) {
  7. const u = "https://merida.morpheu5.net/";
  8. const _paq = window._paq = window._paq || [];
  9. _paq.push(['setRequestMethod', 'POST']);
  10. _paq.push(['requireCookieConsent']);
  11. _paq.push(['trackPageView']);
  12. _paq.push(['enableLinkTracking']);
  13. _paq.push(['setTrackerUrl', `${u}balmyogre`]);
  14. _paq.push(['setSiteId', process.dev ? '3' : '1']);
  15. useHead({
  16. script: [
  17. {
  18. src: `${u}prettyprincess`,
  19. body: true,
  20. async: true,
  21. }
  22. ]
  23. });
  24. }
  25. });