@lukemnet/vuepress-plugin-matomo

Matomo plugin for VuePress


Keywords
documentation, vue, vuepress, generator, matomo
License
MIT
Install
npm install @lukemnet/vuepress-plugin-matomo@1.0.3

Documentation

@lukemnet/vuepress-plugin-matomo

Allows Matomo access tracking on VuePress.

This project is an independently maintained fork of vuepress-plugin-matomo intended to keep compatibility with future versions of VuePress and Matomo.

This project takes many ideas from vue-matomo, but tries to make them SSR friendly for vuepress usage.

Installation

npm install @lukemnet/vuepress-plugin-matomo

or

yarn add @lukemnet/vuepress-plugin-matomo

VuePress Setup

Add the following block to the plugins array of your config.js file.

// ...
  plugins: [
    // ... other plugins...
    [
      "@lukemnet/vuepress-plugin-matomo":
      {
        'siteId': 1,
        'trackerUrl': "https://my.matomo.url.here/"
      }
    ],
    // ... more plugins...
  ]
// ...

Also see VuePress plugin page. This plugin uses babel-style options for configuration.

Plugin Options

  • trackerUrl (string, Required)
    • URL where the piwik.php/piwik.js files can be found
  • siteID (number, Required)
    • Matomo numeric site ID of the site you want to track
  • trackerJsFile (string, defaults to "piwik.js", Optional)
    • Name of the js file to call on the matomo server
  • trackerPhpFile (string, defaults to "piwik.php", Optional)
    • Name of the php file to call on the matomo server
  • enableLinkTracking (boolean, defaults to true, Optional)
    • Enable/disable link click tracking

License

MIT License, see LICENSE.txt for more info.