Switch from Umami to Piwik
This commit is contained in:
parent
f891e44dcc
commit
1e5eff3a17
1 changed files with 16 additions and 8 deletions
|
@ -3,9 +3,9 @@ const { Title, Description } = Astro.props;
|
||||||
|
|
||||||
// Don't count views in local environment
|
// Don't count views in local environment
|
||||||
if (Astro.url.hostname === "localhost") {
|
if (Astro.url.hostname === "localhost") {
|
||||||
var UseUmami = false;
|
var UsePiwik = false;
|
||||||
} else {
|
} else {
|
||||||
var UseUmami = true;
|
var UsePiwik = true;
|
||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -36,12 +36,20 @@ if (Astro.url.hostname === "localhost") {
|
||||||
<script type="module" src="/@shoelace-style/shoelace/cdn/shoelace.js"
|
<script type="module" src="/@shoelace-style/shoelace/cdn/shoelace.js"
|
||||||
></script>
|
></script>
|
||||||
{
|
{
|
||||||
UseUmami ? (
|
UsePiwik ? (
|
||||||
<script
|
<script>
|
||||||
defer
|
var _paq = window._paq = window._paq || [];
|
||||||
src="https://umami.sudovanilla.com/script.js"
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
data-website-id="a779721e-4bae-4520-9d77-8fd055cb0062"
|
_paq.push(['trackPageView']);
|
||||||
/>
|
_paq.push(['enableLinkTracking']);
|
||||||
|
(function() {
|
||||||
|
var u="//stats.sudovanilla.org/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
_paq.push(['setSiteId', '1']);
|
||||||
|
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);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue