https://github.com/qdot/vuepress-plugin-matomo
Matomo plugin for vuepress >= 1.0
https://github.com/qdot/vuepress-plugin-matomo
Last synced: about 1 year ago
JSON representation
Matomo plugin for vuepress >= 1.0
- Host: GitHub
- URL: https://github.com/qdot/vuepress-plugin-matomo
- Owner: qdot
- License: mit
- Created: 2019-01-13T02:09:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-08T01:12:09.000Z (almost 4 years ago)
- Last Synced: 2024-11-13T17:38:17.049Z (over 1 year ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 9
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Matomo Vuepress Plugin
Allows Matomo access tracking on vuepress >= 1.0. Does not work on
Vuepress 0.x, requires 1.x alpha branch with plugin support.
This project takes many ideas from
[vue-matomo](https://github.com/AmazingDreams/vue-matomo/), but tries
to make them SSR friendly for vuepress usage.
## Installation
```
npm install vuepress-plugin-matomo
```
or
```
yarn add vuepress-plugin-matomo
```
## Vuepress Setup
Add the following block to the plugins array of your *config.js* file.
```js
// ...
plugins: [
// ... other plugins...
[
"vuepress-plugin-matomo":
{
'siteId': 1,
'trackerUrl': "https://my.matomo.url.here/"
}
],
// ... more plugins...
]
// ...
```
Also [see vuepress' plugin page](https://vuepress.vuejs.org/plugin/using-a-plugin.html). This plugin uses [babel-style options](https://vuepress.vuejs.org/plugin/using-a-plugin.html#plugin-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](LICENSE.txt) for more info.