By default you can use Google Analytics with Grafana. But there are alternatives.
This module integrates Grafana Faro observability library with Hugo.
This module is inspired by https://github.com/hugomods/plausible-analytics
git submodule add https://github.com/cbos/hugo-faro-analytics.git themes/faro-analytics[module]
[[module.imports]]
path = 'faro-analytics'{{ partial "faro-analytics/assets/js" . }}
| Parameter | type | required | description |
|---|---|---|---|
| endpoint | string | yes | Url of the Faro collector like https://faro-collector-prod-eu-west-2.grafana.net/collect/xxx |
| name | string | yes | Name of the application |
| version | string | no | Version to report, can be used to make distinction between releases |
Environment like production or development is automatically added, as hugo.Environment variable is used.
[params]
[params.faro_analytics]
endpoint = "https://faro-collector-..."
name = "name"
version = "1.0.0"If you want to exclude a page from analytics, you can configure that per page.
| Parameter | type | required | description |
|---|---|---|---|
| enabled | boolean | no | By default analysis for a page is abled. Make it false to disable it |
faro_analytics:
analyze: true