Add plausible

This commit is contained in:
kolaente 2020-06-18 18:25:11 +02:00
parent 7dce4df7b6
commit a2acd321f8
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 4 additions and 18 deletions

View File

@ -1,17 +0,0 @@
{{ if .Site.Params.fanthomEnabled }}
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '//{{ .Site.Params.fathomUrl }}/tracker.js', 'fathom');
fathom('set', 'siteId', '{{ .Site.Params.fathomSiteID }}');
fathom('trackPageview');
</script>
<!-- / Fathom -->
{{end}}

View File

@ -65,6 +65,6 @@
});
</script>
{{ partial "fathom-tracking.html" . }}
{{ partial "plausible-tracking.html" . }}
</body>
</html>

View File

@ -0,0 +1,3 @@
{{ if .Site.Params.plausibleEnabled }}
<script async defer data-domain="{{ .Site.Params.plausibleDomain }}" src="{{ .Site.Params.plausibleURL }}/js/plausible.js"></script>
{{end}}