Web analysis

John Doe 2025-02-18 15:07:10
Categories: Tags:

By default, the website analysis feature is disabled. If you need to enable the corresponding website analysis feature, please refer to the relevant configuration of the website.

_config.node-tree.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#------------------------------------------------------
# Enable Website Analytics, Supporting Google and Baidu Analytics
#------------------------------------------------------
analytics:
# Baidu analytics, get the string behind `hm.js?`
# See: https://tongji.baidu.com/
baidu:
enable: false
hm: ''
# Google Analytics 4 MEASUREMENT_ID
# See: https://support.google.com/analytics/answer/9744165#zippy=%2Cin-this-article
google:
enable: false
id: ''

Baidu Analytics

You can set the analytics.baidu.enable configuration to true to enable Baidu Analytics, and then you need to fill in the hm character corresponding to the site into the analytics.baidu.hm configuration.

_config.node-tree.yml
1
2
3
4
analytics:
baidu:
enable: false
hm: ''

For related configurations, please refer to the Baidu Analytics documentation.

Google analytics

You can set the analytics.google.enable configuration to true to enable Google Analytics, and then you need to fill in the id character corresponding to the site into the analytics.google.id configuration.

_config.node-tree.yml
1
2
3
4
analytics:
google:
enable: false
id: ''

For related configurations, please refer to the Google Analytics 4 documentation