Plausible is a lightweight and open-source Google Analytics alternative.
Become a backer or sponsor to support our work.
Module | github.com/hugomods/plausible-analytics |
---|---|
Stats |
1module:
2 imports:
3 - path: github.com/hugomods/plausible-analytics
1[module]
2 [[module.imports]]
3 path = 'github.com/hugomods/plausible-analytics'
1{
2 "module": {
3 "imports": [
4 {
5 "path": "github.com/hugomods/plausible-analytics"
6 }
7 ]
8 }
9}
Note
Please skip this step if your theme supports HugoPress, such as HB Framework themes.
1{{ partial "plausible-analytics/assets/js" . }}
params.plausible_analytics.endpoint
Name | Context | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
params.plausible_analytics.endpoint | - | string | - | https://plausible.io | - | - |
The endpoint of Plausible Analytics.
params.plausible_analytics.file_downloads
Name | Context | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
params.plausible_analytics.file_downloads | - | boolean | - | false | - | - |
Whether to track file downloads.
params.plausible_analytics.outbound_links
Name | Context | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
params.plausible_analytics.outbound_links | - | boolean | - | false | - | - |
Whether to track clicks on outbound links.
params.plausible_analytics.local
Name | Context | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
params.plausible_analytics.local | - | boolean | - | false | - | - |
When true
, track on localhost
.
hugo.yaml
1params:
2 plausible_analytics:
3 endpoint: https://plausible.io
4 file_downloads: false
5 local: false
6 outbound_links: false
hugo.toml
1[params]
2 [params.plausible_analytics]
3 endpoint = 'https://plausible.io'
4 file_downloads = false
5 local = false
6 outbound_links = false
hugo.json
1{
2 "params": {
3 "plausible_analytics": {
4 "endpoint": "https://plausible.io",
5 "file_downloads": false,
6 "local": false,
7 "outbound_links": false
8 }
9 }
10}
analyze
Name | Context | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
analyze | - | boolean | - | true | - | - |
Exclude pages from being tracked if false
.
plausible_analytics.file_downloads
Name | Context | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
plausible_analytics.file_downloads | - | boolean | - | - | - | - |
Whether to track file downloads.
plausible_analytics.outbound_links
Name | Context | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
plausible_analytics.outbound_links | - | boolean | - | - | - | - |
Whether to track clicks on outbound links.
1analyze: true
2plausible_analytics:
3 file_downloads: false
4 outbound_links: false
1analyze = true
2[plausible_analytics]
3 file_downloads = false
4 outbound_links = false
1{
2 "analyze": true,
3 "plausible_analytics": {
4 "file_downloads": false,
5 "outbound_links": false
6 }
7}