Add umami analytics support
This commit is contained in:
parent
49b6f15701
commit
e984e2b0fb
|
@ -107,6 +107,10 @@ summaryLength = 70 # number of words for article summaries
|
||||||
plausibleScriptUrl = "https://something.com/..."
|
plausibleScriptUrl = "https://something.com/..."
|
||||||
plausibleDomain = "example.com"
|
plausibleDomain = "example.com"
|
||||||
|
|
||||||
|
# enable analytics using Umami
|
||||||
|
umamiScriptUrl = "https://something.com/..."
|
||||||
|
umamiWebsiteId = "example-tracking-code"
|
||||||
|
|
||||||
enableShareOnFediverse = false # enable a button at the end of an article to share it on the fediverse
|
enableShareOnFediverse = false # enable a button at the end of an article to share it on the fediverse
|
||||||
tocBeforeImage = false # show the table of contents before the main article image; default false
|
tocBeforeImage = false # show the table of contents before the main article image; default false
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
{{ if .Site.Params.umamiScriptUrl }}
|
||||||
|
{{ if .Site.Params.umamiWebsiteId }}
|
||||||
|
<script
|
||||||
|
async
|
||||||
|
defer
|
||||||
|
data-website-id="{{ .Site.Params.umamiWebsiteId }}"
|
||||||
|
src="{{ .Site.Params.umamiScriptUrl }}"
|
||||||
|
></script>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue