项目作者: webmasterish

项目描述 :
Minimal Google Analytics plugin for VuePress
高级语言: JavaScript
项目地址: git://github.com/webmasterish/vuepress-plugin-minimal-analytics.git
创建时间: 2018-12-23T07:42:32Z
项目社区:https://github.com/webmasterish/vuepress-plugin-minimal-analytics

开源协议:MIT License

下载


VuePress Plugin Minimal Google Analytics

Minimal Google Analytics plugin for VuePress 1.x

Build Status
npm version
Greenkeeper badge
MIT License

Why

Because sometimes all you need is just the page views
without all the bloated libraries.

What

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.

Install

  1. $ npm install -D vuepress-plugin-minimal-analytics
  2. # or
  3. $ yarn add -D vuepress-plugin-minimal-analytics

Usage

Add vuepress-plugin-minimal-analytics in your site or theme config file.

See official docs on using a plugin

  1. // .vuepress/config.js
  2. // or
  3. // .vuepress/theme/index.js
  4. // replace 'XX-XXXXXXXXX-X' with your tracking id
  5. module.exports = {
  6. plugins: [
  7. ['minimal-analytics', {ga: 'XX-XXXXXXXXX-X'}]
  8. ]
  9. }

Options

See Plugin Option API official docs

ga

  • Type: string
  • Default: undefined

Provide the Google Analytics ID to enable integration.

Reference

License

MIT © webmasterish