Skip to content

Commit e06b3ca

Browse files
committed
feat: add google analytics
1 parent e711af7 commit e06b3ca

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

docs/.vuepress/config.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { viteBundler } from '@vuepress/bundler-vite'
22
import { defaultTheme } from '@vuepress/theme-default'
3+
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
34
import { defineUserConfig } from 'vuepress'
45

56
export default defineUserConfig({
@@ -58,6 +59,9 @@ export default defineUserConfig({
5859
{
5960
isSearchable: page => page.path !== '/',
6061
},
62+
googleAnalyticsPlugin({
63+
id: 'G-7W625EPRG6',
64+
}),
6165
],
6266
],
6367
})

package-lock.json

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"devDependencies": {
1313
"@vuepress/bundler-vite": "^2.0.0-rc.20",
14+
"@vuepress/plugin-google-analytics": "^2.0.0-rc.80",
1415
"@vuepress/plugin-search": "2.0.0-rc.83",
1516
"@vuepress/theme-default": "^2.0.0-rc.84",
1617
"prettier": "2.8.8",

0 commit comments

Comments
 (0)