Baidu Analytics tracking for GitBook

Dependency Status devDependency Status

A gitbook plugin to add Baidu Analytics for your book

Install Plugin

Install with this command:

  1. npm install gitbook-plugin-baidu

or add this to your book.json config:

  1. {
  2. "plugin": ["baidu"]
  3. }

and install it using:

  1. gitbook install ./

Use Plugin

First you should have a Baidu Analytics token, looks like c12134efe8099063bacebecb25df3b7d.

Then add your token to book.json config:

  1. {
  2. "plugin": ["baidu"],
  3. "pluginsConfig": {
  4. "baidu": {
  5. "token": "YOUR TOKEN"
  6. }
  7. }
  8. }

Finally build your book with gitbook again and you’ll get what you want.

History

  • Ver 0.0.2 init