https://github.com/sylingd/vuepress-baidu-google-analytics
Using both baidu tongji and Google analytics in vuepress
https://github.com/sylingd/vuepress-baidu-google-analytics
vue vuepress vuepress-plugin
Last synced: 7 days ago
JSON representation
Using both baidu tongji and Google analytics in vuepress
- Host: GitHub
- URL: https://github.com/sylingd/vuepress-baidu-google-analytics
- Owner: sylingd
- License: mit
- Created: 2019-05-17T02:32:13.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-18T13:20:43.000Z (about 5 years ago)
- Last Synced: 2025-06-04T11:37:49.755Z (22 days ago)
- Topics: vue, vuepress, vuepress-plugin
- Language: JavaScript
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vuepress-plugin-baidu-google-analytics
[](https://v1.vuepress.vuejs.org/)
[](https://www.npmjs.com/package/vuepress-plugin-baidu-google-analytics)
Google analytics and Baidu tongji plugin for vuepress
## Install
```bash
yarn add -D vuepress-plugin-baidu-google-analytics
# OR
npm install -D vuepress-plugin-baidu-google-analytics
```## Usage
```javascript
module.exports = {
plugins: [
['vuepress-plugin-baidu-google-analytics', {
hm: 'abcdefghijklmnopqrstuvwxyz123456',
ga: 'abcdefghijklmnopqrstuvwxyz123456',
ignore_hash: false
}]
]
}
```## Options
### hm
- Type: `string`
- Default: `undefined`Provide the Baidu Tongji ID to enable Baidu Tongji.
### ga
- Type: `string`
- Default: `undefined`Provide the Google Analytics ID to enable Google Analytics.
### ignore_hash
- Type: `boolean`
- Default: `false`If enable, same page with different hash (after `#`) will not be count multiple times.