feat(plugins): add Google Analytics plugin (#66)
This commit is contained in:
parent
9605c18fff
commit
ac61bb0e75
7 changed files with 96 additions and 4 deletions
|
|
@ -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'
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue