Added fathom template

This commit is contained in:
konrad 2019-02-06 16:00:16 +01:00
parent 03e985759e
commit a110f291e6
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,17 @@
{{ 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

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