Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ZhongxuYang/vitepress-plugin-google-analytics

google-analytics plugin for vitepress
https://github.com/ZhongxuYang/vitepress-plugin-google-analytics

google-analytics vitepress-plugin

Last synced: about 2 months ago
JSON representation

google-analytics plugin for vitepress

Awesome Lists containing this project

README

        

# vitepress-plugin-google-analytics

> Google analytics plugin for Vitepress



vitepress-plugin-google-analytics logo



Downloads
Version
License

## Install
```sh
yarn add -D vitepress-plugin-google-analytics
# OR npm install -D vitepress-plugin-google-analytics
```

## Usage
```ts
// .vitepress/theme/index.ts

import DefaultTheme from "vitepress/theme"
import googleAnalytics from 'vitepress-plugin-google-analytics'

export default {
...DefaultTheme,
enhanceApp: (ctx) => {
googleAnalytics({
id: 'G-******', // Replace with your GoogleAnalytics ID, which should start with the 'G-'
})
}
}
```

Then you can use `Google analytics` in `production`! 🎉