Update Doc About Baidu Analytics (#809)
### Prerequisites
Put an `x` into the box(es) that apply:
- [ ] This pull request fixes a bug.
- [x] This pull request adds a feature.
- [ ] This pull request introduces breaking change.
### Description
Update documentation about using Baidu analytics in this theme.
### Issues Resolved
List any existing issues this pull request resolves.
### Checklist
Put an `x` into the box(es) that apply:
#### General
- [x] Describe what changes are being made
- [ ] Explain why and how the changes were necessary and implemented
respectively
- [ ] Reference issue with `#<ISSUE_NO>` if applicable
#### Resources
- [ ] If you have changed any SCSS code, run `make release` to
regenerate all CSS files
#### Contributors
- [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already
1 files modified
1 files added
| | |
| | | *in alphabetic order* |
| | | |
| | | * [Application Insights](https://azure.com/) - [documentation](/docs/analytics/applicationinsights.md) |
| | | * [Baidu Analytics](https://tongji.baidu.com/) - [documentation](/docs/analytics/baidu.md) |
| | | * [Cloudflare](https://www.cloudflare.com/analytics/) - [documentation](/docs/analytics/cloudflare.md) |
| | | * [Google Analytics](https://developers.google.com/analytics) - [documentation](/docs/analytics/googleanalytics.md) |
| | | * [Google Tag Manager](https://developers.google.com/tag-manager) - [documentation](/docs/analytics/googletagmanager.md) |
| New file |
| | |
| | | # Baidu |
| | | |
| | | To use Baidu analytics in this theme, navigate to the setting page of your |
| | | site at <https://tongji.baidu.com/>. You will get a piece of JS code provided |
| | | as follows: |
| | | |
| | | ```js |
| | | <script> |
| | | var _hmt = _hmt || []; |
| | | (function() { |
| | | var hm = document.createElement("script"); |
| | | hm.src = "https://hm.baidu.com/hm.js?<your_token_at_here>"; |
| | | var s = document.getElementsByTagName("script")[0]; |
| | | s.parentNode.insertBefore(hm, s); |
| | | })(); |
| | | </script> |
| | | ``` |
| | | |
| | | Then you can use it by filling your site toke `your_token_at_here` in the |
| | | config file: |
| | | |
| | | ```toml |
| | | [params.baidu] |
| | | token = "your_token_at_here" |
| | | ``` |