| README.md | ●●●●● patch | view | raw | blame | history | |
| exampleSite/config/_default/params.toml | ●●●●● patch | view | raw | blame | history | |
| layouts/partials/analytics/umami.html | ●●●●● patch | view | raw | blame | history | |
| layouts/partials/head.html | ●●●●● patch | view | raw | blame | history |
README.md
@@ -28,6 +28,7 @@ - Comments powered by Disqus, Commento or Utteranc.es (optional) - SimpleAnalytics (optional) - Plausible Analytics (optional) - Umami Analytics (optional) - KaTex support (optional) - Formspree Contact Form (optional) - Twitter Cards support @@ -409,7 +410,7 @@ ### Plausible Analytics To use Plausible Analytics, include the following section and change the domain to your site's domain. If you self-host Plausible, you can optionally specify the url of your own instance. To use Plausible Analytics, include the following section and change the domain to your site's domain. If you self-host Plausible, you can optionally specify the URL of your own instance. ```toml [params.plausibleAnalytics] @@ -417,6 +418,16 @@ # serverURL = "https://analytics.example.com" ``` ### Umami Analytics To use Umami Analytics, include the following section and change the serverURL to your self-hosted Umami server URL. Additionally, you will need to provide your website ID. ```toml [params.umami] serverURL = "example.com" id = "94db1cb1-74f4-4a40-ad6c-962362670409" ``` ### Google Site Verification To use Google Site Verification, add the following line to the `[params]`: exampleSite/config/_default/params.toml
@@ -38,6 +38,10 @@ # domain = "example.com" # serverURL = "https://analytics.example.com" [umami] # serverURL = "example.com" # id = "94db1cb1-74f4-4a40-ad6c-962362670409" ## Math settings [math] enable = false # options: true, false. Enable math support globally, default: false. You can always enable math on per page. layouts/partials/analytics/umami.html
New file @@ -0,0 +1,6 @@ <script async defer src="https://{{ .Site.Params.umami.serverURL }}/umami.js" data-website-id="{{ .Site.Params.umami.id }}" ></script> layouts/partials/head.html
@@ -200,6 +200,12 @@ {{ if and hugo.IsProduction .Site.Params.plausibleAnalytics .Site.Params.plausibleAnalytics.domain }} {{- partial "analytics/plausible" . -}} {{ end }} {{ if and hugo.IsProduction .Site.Params.umami.serverURL .Site.Params.umami.id }} {{- partial "analytics/umami" . -}} {{ end }}