Baidu Analytics is a powerful and thorough tool for collecting accurate analytics from a campaign.
Become a backer or sponsor to support our work.
Module | github.com/hugomods/baidu-analytics |
---|---|
Stats |
1module:
2 imports:
3 - path: github.com/hugomods/baidu-analytics
1[module]
2 [[module.imports]]
3 path = 'github.com/hugomods/baidu-analytics'
1{
2 "module": {
3 "imports": [
4 {
5 "path": "github.com/hugomods/baidu-analytics"
6 }
7 ]
8 }
9}
Note
Please skip this step if your theme supports HugoPress, such as HB Framework themes.
1<head>
2 {{ partialCached "hugomods/baidu-analytics/index" . .Params.analyze }}
3</head>
params.services.baidu_analytics.id
Name | Context | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
params.services.baidu_analytics.id | - | string | - | - | - | - |
The measurement ID.
hugo.yaml
1params:
2 services:
3 baidu_analytics:
4 id: XXXXXXXX
hugo.toml
1[params]
2 [params.services]
3 [params.services.baidu_analytics]
4 id = 'XXXXXXXX'
hugo.json
1{
2 "params": {
3 "services": {
4 "baidu_analytics": {
5 "id": "XXXXXXXX"
6 }
7 }
8 }
9}
analyze
Name | Context | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
analyze | - | boolean | - | true | - | - |
Exclude pages from being tracked if false
.