Minimal Google Analytics plugin for VuePress
Minimal Google Analytics plugin for VuePress 1.x
Because sometimes all you need is just the page views
without all the bloated libraries.
This plugin is based on the official VuePress plugin @vuepress/plugin-google-analytics - @vuepress/plugin-google-analytics">npm.
The difference betweeen this plugin and the official one is that it uses a light
version of the tracking code as introduced
by 🌱 minimalanalytics.com - source code in this gist.
$ npm install -D vuepress-plugin-minimal-analytics
# or
$ yarn add -D vuepress-plugin-minimal-analytics
Add vuepress-plugin-minimal-analytics
in your site or theme config file.
// .vuepress/config.js
// or
// .vuepress/theme/index.js
// replace 'XX-XXXXXXXXX-X' with your tracking id
module.exports = {
plugins: [
['minimal-analytics', {ga: 'XX-XXXXXXXXX-X'}]
]
}
See Plugin Option API official docs
string
undefined
Provide the Google Analytics ID to enable integration.
MIT © webmasterish