Prechádzať zdrojové kódy

Update Matomo stuff

Andrea Franceschini 1 rok pred
rodič
commit
d90a536d15
2 zmenil súbory, kde vykonal 6 pridanie a 5 odobranie
  1. 1 1
      nuxt.config.ts
  2. 5 4
      plugins/matomo.client.ts

+ 1 - 1
nuxt.config.ts

@@ -16,7 +16,7 @@ export default defineNuxtConfig({
                         so <a href="/contact">please send me an e-mail</a> — no judgement.<br />
                         Second: yes, I hate it too, but in this day and age JavaScript is kinda ubiquitous so I caved in.
                         I am still making an effort but this site may look a bit weird and hardly usable without JS. Sorry…
-                    <noscript><p><img src="https://matomo.morpheu5.net/matomo.php?idsite=1&amp;rec=1" style="border:0;" alt="" /></p></noscript>
+                    <noscript><p><img src="https://merida.morpheu5.net/balmyogre?idsite=1&amp;rec=1" style="border:0;" alt="" /></p></noscript>
                     </div>`
                 },
             ],

+ 5 - 4
plugins/matomo.client.ts

@@ -1,4 +1,4 @@
-// <noscript><p><img src="https://matomo.morpheu5.net/matomo.php?idsite=1&amp;rec=1" style="border:0;" alt="" /></p></noscript>
+// <noscript><p><img src="https://merida.morpheu5.net/balmyogre?idsite=1&amp;rec=1" style="border:0;" alt="" /></p></noscript>
 
 import { ConsentStore } from "~~/types";
 
@@ -7,18 +7,19 @@ export default defineNuxtPlugin(_nuxtApp => {
     const analytics = consentStore?.analytics;
 
     if (analytics || true) {
-        const u = "https://matomo.morpheu5.net/";
+        const u = "https://merida.morpheu5.net/";
         const _paq = window._paq = window._paq || [];
+        _paq.push(['setRequestMethod', 'POST']);
         _paq.push(['requireCookieConsent']);
         _paq.push(['trackPageView']);
         _paq.push(['enableLinkTracking']);
-        _paq.push(['setTrackerUrl', `${u}matomo.php`]);
+        _paq.push(['setTrackerUrl', `${u}balmyogre`]);
         _paq.push(['setSiteId', process.dev ? '3' : '1']);
         
         useHead({
             script: [
                 {
-                    src: `${u}matomo.js`,
+                    src: `${u}prettyprincess`,
                     body: true,
                     async: true,
                 }