feat(analytics): make Umami DNT behavior configurable

This commit is contained in:
2025-07-12 19:05:59 +07:00
parent 8a6ccebbaa
commit 67cf24cf42
3 changed files with 7 additions and 1 deletions

View File

@@ -265,6 +265,9 @@ service = "goatcounter"
id = "zloy"
#self_hosted_url = "https://zloy.goatcounter.com"
# Optional: For Umami, enable this option to respect users' Do Not Track (DNT) settings. The default is true.
do_not_track = true
[extra.isso]
enabled_for_all_posts = true # Enables Isso on all posts. It can be enabled on individual posts by setting `isso = true` in the [extra] section of a post's front matter.
automatic_loading = true # If set to false, a "Load comments" button will be shown.

View File

@@ -25,7 +25,7 @@
data-website-id="{{ analytics_id }}"
src="https://cloud.umami.is/script.js"
{% endif %}
data-do-not-track="true">
{% if config.extra.analytics.do_not_track %}data-do-not-track="true"{% endif %}>
</script>
{% elif analytics_service == "plausible" %}

View File

@@ -320,6 +320,9 @@ custom_subset = true
# Leave this field empty if you're using the service's default hosting.
# self_hosted_url = ""
# Optional: For Umami, enable this option to respect users' Do Not Track (DNT) settings. The default is true.
do_not_track = true
# giscus support for comments. https://giscus.app
# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup
[extra.giscus]