Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ disableKinds = ["taxonomy", "term", "RSS"]
# does not record visits. Clear either value to turn it off.
umami_script = "https://analytics.rlew.io/script.js"
umami_website_id = "ca6a5ba0-17fd-4ec8-94a0-67a3c71e288f"
# Counterscale analytics, same rules as Umami.
counterscale_script = "https://stats.rlew.io/tracker.js"
counterscale_site_id = "things.rlew.io"

# The changelog page reads releases from the GitHub API at build time. Hugo
# only lets templates read environment variables on this list; the first two
Expand Down
7 changes: 7 additions & 0 deletions docs/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@
{{- if and hugo.IsProduction $umamiScript $umamiSite }}
<script defer src="{{ $umamiScript }}" data-website-id="{{ $umamiSite }}"></script>
{{- end }}

{{- /* Counterscale analytics, same rules as Umami above. */}}
{{- $csScript := site.Params.counterscale_script }}
{{- $csSite := site.Params.counterscale_site_id }}
{{- if and hugo.IsProduction $csScript $csSite }}
<script id="counterscale-script" data-site-id="{{ $csSite }}" src="{{ $csScript }}" defer></script>
{{- end }}
Loading