diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index fbfcd3e..8873dc6 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -56,3 +56,4 @@ - [Anson VanDoren](https://github.com/anson-vandoren) - [Michael Lynch](https://github.com/mtlynch) - [FIGBERT](https://figbert.com/) +- [Yash Mehrotra](https://yashmehrotra.com) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2a38e9b..61ed225 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -50,6 +50,12 @@ disqusShortname = "yourdiscussshortname" # Custom JS custom_js = [] +# If you want to use fathom(https://usefathom.com) for analytics, add this section +[params.fathomAnalytics] + siteID = "ABCDE" + # Default value is cdn.usefathom.com, overwrite this if you are self-hosting + serverURL = "analytics.example.com" + [taxonomies] category = "categories" series = "series" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3824e2e..a497e5d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -108,6 +108,10 @@ {{ template "_internal/google_analytics.html" . }} + {{ if and .Site.Params.fathomAnalytics .Site.Params.fathomAnalytics.siteID }} + {{- partial "analytics/fathom" . -}} + {{ end }} + diff --git a/layouts/partials/analytics/fathom.html b/layouts/partials/analytics/fathom.html new file mode 100644 index 0000000..13e7cfc --- /dev/null +++ b/layouts/partials/analytics/fathom.html @@ -0,0 +1,13 @@ +