Files
hugo-coder-timeline/layouts/partials/analytics/fathom.html
Yash Mehrotra 93fb14e953 Add support for Fathom Analytics (#264)
* Add support for Fathom Analytics

* Add myself to CONTRIBUTORS.md

* Set default for serverURL and check for siteID

* Update layouts/_default/baseof.html

Co-Authored-By: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>

Co-authored-by: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>
2020-02-11 11:28:14 -03:00

14 lines
477 B
HTML

<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.fathomAnalytics.serverURL | default "cdn.usefathom.com" }}/tracker.js', 'fathom');
fathom('set', 'siteId', '{{ .Site.Params.fathomAnalytics.siteID }}');
fathom('trackPageview');
</script>