add support for Umami analytics

This commit is contained in:
Marten Seemann 2024-03-21 18:51:51 +10:00
parent 741a640b1a
commit 430a25fbf9
2 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,11 @@
{{ partial "google-analytics.html" . }} {{ partial "google-analytics.html" . }}
{{- end }} {{- end }}
<!-- Umami -->
{{- if and hugo.IsProduction .Site.Params.umami.serverURL .Site.Params.umami.id }}
{{ partial "umami.html" . }}
{{- end }}
<script> <script>
/* Initialize light/dark mode */ /* Initialize light/dark mode */

View File

@ -0,0 +1 @@
<script async defer src="https://{{ .Site.Params.umami.serverURL }}/{{ .Site.Params.umami.trackerScriptName | default "umami.js" }}" data-website-id="{{ .Site.Params.umami.id }}" ></script>