Skip to content
Permalink
Browse files

Add support for fathom analytics.

  • Loading branch information
Juraj Bubniak
Juraj Bubniak committed Jan 7, 2020
1 parent 409f0d5 commit 7a1356ceab60cd2209283baf54b2ae32c6b70a5e
Showing with 22 additions and 0 deletions.
  1. +2 −0 README.md
  2. +2 −0 exampleSite/config.toml
  3. +17 −0 layouts/partials/fathom.html
  4. +1 −0 layouts/partials/header.html
@@ -90,6 +90,8 @@ disqusShortname = "XXX"
exponeaTrackVisits = false
readingTime = true
readingTimeText = "Estimated reading time:"
fathomUrl = ""
fathomSiteId = ""
[Permalinks]
post = "/:year/:month/:day/:filename/"
@@ -50,6 +50,8 @@ googleAnalytics = "XXX"
exponeaTrackVisits = false
readingTime = true
readingTimeText = "Estimated reading time:"
fathomUrl = ""
fathomSiteId = ""

[Permalinks]
post = "/:year/:month/:day/:filename/"
@@ -0,0 +1,17 @@
{{ if .Site.Params.fathomUrl }}
<!-- 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 }}', 'fathom');
fathom('set', 'siteId', '{{ .Site.Params.fathomSiteId }}');
fathom('trackPageview');
</script>
<!-- / Fathom -->
{{ end }}
@@ -19,6 +19,7 @@
{{ end }}
{{ partial "extra-in-head.html" . }}
{{ partial "exponea.html" . }}
{{ partial "fathom.html" . }}
</head>
<body>
{{ template "_internal/google_analytics.html" . }}

0 comments on commit 7a1356c

Please sign in to comment.
You can’t perform that action at this time.