feat(plugins): add Google Analytics plugin (#66)

This commit is contained in:
cinwell.li 2017-02-09 22:16:15 +08:00 committed by GitHub
commit ac61bb0e75
7 changed files with 96 additions and 4 deletions

View file

@ -468,7 +468,7 @@ If a document can have a search, can enhance some user experience. Installing th
```html
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
```
@ -495,3 +495,20 @@ window.$docsify = {
}
}
```
### Google Analytics
Install the plugin and configure the track id.
```html
<script src="//unpkg.com/docsify" data-ga="UA-XXXXX-Y"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
```
or
```js
window.$docsify = {
ga: 'UA-XXXXX-Y'
}
```

View file

@ -501,3 +501,20 @@ window.$docsify = {
}
}
```
### Google Analytics
安装插件并且配置 track id。
```html
<script src="//unpkg.com/docsify" data-ga="UA-XXXXX-Y"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
```
或者
```js
window.$docsify = {
ga: 'UA-XXXXX-Y'
}
```