feat(analytics): make Umami DNT behavior configurable (#536)

Co-authored-by: welpo <welpo@users.noreply.github.com>
This commit is contained in:
undecV 2025-06-17 04:42:13 +08:00 committed by GitHub
parent 23a1baf96c
commit 9b115904d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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