0.1.1 • Published 3 years ago

vuepress-plugin-google-analytics-4 v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

VuePress Google Analytics 4 Plugin

This plugin is designed to add support for Google Analytics 4 (gtag) usage in VuePress v1.x versions. The official google analytics plugin doesn't support gtag, but this plugin serves as a workaround to enable gtag-based tracking in your VuePress site.

Installation

To install this plugin, simply add it to your VuePress project's dependencies:

yarn add vuepress-plugin-google-analytics-4
# OR npm install vuepress-plugin-google-analytics-4

Usage

Once the plugin is installed, add the following configuration to your config.js file:

module.exports = {
  plugins: {
    'google-analytics-4': {
        // your gtag tracking ID
        gtag: 'G-0000000000'
    }
  }
}

Or, in list format:

module.exports = {
  plugins: [
    [
      'google-analytics-4',
      {
        // your gtag tracking ID
        gtag: 'G-0000000000'
      }
    ]
  ]
};

Replace G-0000000000 with your own Google Analytics 4 tracking ID.

Credit

Some of the code in this plugin is borrowed from the official Google Analytics plugin for VuePress.

0.1.1

3 years ago

0.1.0

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago