diff --git a/config.toml b/config.toml index fbcb337..4278538 100644 --- a/config.toml +++ b/config.toml @@ -372,6 +372,9 @@ service = "goatcounter" # Leave this field empty if you're using the service's default hosting. self_hosted_url = "https://tabi-stats.osc.garden" +# 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] diff --git a/content/blog/mastering-tabi-settings/index.ca.md b/content/blog/mastering-tabi-settings/index.ca.md index 362ef2d..ca86971 100644 --- a/content/blog/mastering-tabi-settings/index.ca.md +++ b/content/blog/mastering-tabi-settings/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Domina la configuració de tabi: guia completa" date = 2023-09-18 -updated = 2025-06-08 +updated = 2025-06-16 description = "Descobreix les múltiples maneres en què pots personalitzar tabi." [taxonomies] @@ -802,6 +802,8 @@ Pots configurar-los en la secció `[extra.analytics]` del teu arxiu `config.toml - Per a Umami: `"https://umami.example.com"` - Per a Plausible: `"https://plausible.example.com"` +- `do_not_track`: (només per a Umami) opcional. Quan s'estableix com a `true`, es desactiva el seguiment per als usuaris els navegadors dels quals envien una capçalera "Do Not Track". + Un exemple de configuració per a GoatCounter no auto-allotjada seria: ```toml diff --git a/content/blog/mastering-tabi-settings/index.es.md b/content/blog/mastering-tabi-settings/index.es.md index 749095d..57b08d8 100644 --- a/content/blog/mastering-tabi-settings/index.es.md +++ b/content/blog/mastering-tabi-settings/index.es.md @@ -1,7 +1,7 @@ +++ title = "Domina la configuración de tabi: guía completa" date = 2023-09-18 -updated = 2025-06-08 +updated = 2025-06-16 description = "Descubre las múltiples maneras en que puedes personalizar tabi." [taxonomies] @@ -803,6 +803,8 @@ Puedes configurarlos en la sección `[extra.analytics]` de tu archivo `config.to - Para Umami: `"https://umami.example.com"` - Para Plausible: `"https://plausible.example.com"` +- `do_not_track`: (sólo para Umami) opcional. Cuando se establece en `true`, se desactiva el seguimiento para los usuarios cuyos navegadores envían un encabezado "Do Not Track". + Un ejemplo de configuración para GoatCounter no auto-alojada sería: ```toml diff --git a/content/blog/mastering-tabi-settings/index.md b/content/blog/mastering-tabi-settings/index.md index 19d9584..27c8d9d 100644 --- a/content/blog/mastering-tabi-settings/index.md +++ b/content/blog/mastering-tabi-settings/index.md @@ -1,7 +1,7 @@ +++ title = "Mastering tabi Settings: A Comprehensive Guide" date = 2023-09-18 -updated = 2025-06-08 +updated = 2025-06-16 description = "Discover the many ways you can customise your tabi site." [taxonomies] @@ -811,6 +811,8 @@ You can set them up in the `[extra.analytics]` section of your `config.toml`. - For Umami: `"https://umami.example.com"` - For Plausible: `"https://plausible.example.com"` +- `do_not_track`: (Umami only) Optional. When set to `true`, the generated tracking script will include the `data-do-not-track="true"` attribute, which disables tracking for users whose browsers send a "Do Not Track" header. + An example configuration for non-self-hosted GoatCounter would look like this: ```toml diff --git a/templates/partials/analytics.html b/templates/partials/analytics.html index 794e61b..6a5d30e 100644 --- a/templates/partials/analytics.html +++ b/templates/partials/analytics.html @@ -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 %}> {% elif analytics_service == "plausible" %} diff --git a/theme.toml b/theme.toml index 55bcd79..9761d73 100644 --- a/theme.toml +++ b/theme.toml @@ -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]