plugin-baidu-tongji

Gungnir
2021-12-27
2 min

npmgithublicense

@renovamen/vuepress-plugin-baidu-tongji@next 插件,用于在 VuePress 2 中引入百度统计。修改自 @vuepress/plugin-google-analytics

安装

pnpm install @renovamen/vuepress-plugin-baidu-tongji@next
yarn add @renovamen/vuepress-plugin-baidu-tongji@next
npm install @renovamen/vuepress-plugin-baidu-tongji@next

配置

需要去百度统计官网上申请一个跟踪代码,然后在 .vuepress/config.js 中配置:

const { baiduTongjiPlugin } = require("@renovamen/vuepress-plugin-baidu-tongji");

module.exports = {
  plugins: [
    baiduTongjiPlugin({
      "id": "your-tracking-code"
    })
  ]
}

开源协议

MIT