add umami docs

This commit is contained in:
Weaxs
2024-03-27 11:49:17 +08:00
parent 5ad54fd91a
commit d4a45eb951
9 changed files with 121 additions and 37 deletions

View File

@@ -11,7 +11,7 @@ series_order: 9
## Analytics
Blowfish provides built-in support for Fathom Analytics and Google Analytics. Fathom is a paid alternative to Google Analytics that respects user privacy.
Blowfish provides built-in support for Fathom Analytics, Google Analytics annd Umami Analytics. Fathom is a paid alternative to Google Analytics that respects user privacy.
### Fathom Analytics
@@ -40,6 +40,19 @@ googleAnalytics = "UA-PROPERTY_ID"
googleAnalytics = "G-MEASUREMENT_ID"
```
### Umami Analytics
To enable Umami Analytics support, simply provide your [Umami tracking code](https://umami.is/docs/collect-data) in the `config/_default/params.toml` file.
If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is).
```toml
# config/_default/params.toml
[umamiAnalytics]
websiteid = "ABC12345"
domain = "llama.yoursite.com"
```
### Custom analytics providers
If you wish to use a different analytics provider on your website you can also override the analytics partial and provide your own script. Simply create the file `layouts/partials/extend-head.html` in your project and it will automatically include it in the `<head>` of the website.