vitepress-plugin-google-analytics

google-analytics plugin for vitepress
27,970 12
Install
npm install vitepress-plugin-google-analytics
Latest Version:1.0.2
License:MIT
Last Updated:Oct 15, 2022
Links: GitHub  ·  npm
Maintainer: zhongxuyang

vitepress-plugin-google-analytics

Google analytics plugin for Vitepress

Install

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

Usage

// .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! 🎉

Related Packages

vuepress

Minimalistic doc generator with Vue component based layout system

3,662,046 22,717
@vuepress/core

Minimalistic doc generator with Vue component based layout system

3,565,041 22,713
@mussi/vitepress-theme

A lightweight VitePress theme extension for Ruby project documentation.

792 6
@vuepress/plugin-nprogress

nprogress plugin for vuepress

3,258,429 22,716
@vuepress/plugin-active-header-links

active-header-links plugin for vuepress

3,218,918 22,716

Version History

Version Released License
1.0.2 MIT
1.0.1 MIT
1.0.0 MIT