From a75cad33c5b0ea50687d3c8fba420e2acd5320f1 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Sun, 28 Jan 2024 04:10:37 +0100 Subject: [PATCH] feat: switch to umami --- docs/.vuepress/head.ts | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/docs/.vuepress/head.ts b/docs/.vuepress/head.ts index 7726111..6d2a93f 100644 --- a/docs/.vuepress/head.ts +++ b/docs/.vuepress/head.ts @@ -3,18 +3,18 @@ interface SimplifiedHeader { content: [any]; } -const matomoTrackingCode = `var _paq = window._paq = window._paq || []; -_paq.push(['trackPageView']); -_paq.push(['enableLinkTracking']); -(function() { - var u="https://matomo.phundrak.com/"; - _paq.push(['setTrackerUrl', u+'matomo.php']); - _paq.push(['setSiteId', '2']); - var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; - g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); -})();`; - const simplifiedHead = [ + { + tag: "script", + content: [ + { + async: true, + src: "https://umami.phundrak.com/script.js", + "data-website-id": "67166941-8c83-4a19-bc8c-139e44b7f7aa", + "data-do-not-track": "true", + }, + ], + }, { tag: "meta", content: [ @@ -135,11 +135,6 @@ simplifiedHead.forEach((tag: SimplifiedHeader) => { head.push([tagName, element]); }); }); -head.push([ - "a", - { rel: "me", href: "https://mastodon.phundrak.com/@phundrak" }, - "Mastodon", -]); -head.push(["script", {}, matomoTrackingCode]); +head.push(["a", { rel: "me", href: "https://emacs.ch/@phundrak" }, "Mastodon"]); export default head;