This package has been deprecated

Author message:

WARNING: This project has been renamed to vue-matomo. Install using vue-matomo instead.

vue-piwik

0.1.6 • Public • Published

VuePiwik

npm vue2 Build Status

Link your Piwik/Matomo installation

Installation

npm install --save vue-piwik

Usage

Bundler (Webpack, Rollup)

import Vue from 'vue'
import VuePiwik from 'vue-piwik'
 
Vue.use(VuePiwik, {
  host: 'https://matomo.example.com',
  siteId: 5,
  router: router // Enables automatically registering pageviews on the router
})
 
// Now you can access piwik api in components through
this.$piwik
 
// or
window._paq.push
 
// or through
window.Piwik.getTracker

For available operations see the piwik api docs

Browser

<!-- Include after Vue -->
<!-- Local files -->
<script src="vue-piwik/dist/vue-piwik.js"></script>
 
<!-- From CDN -->
<script src="https://unpkg.com/vue-piwik"></script>

Build

Bundle the js and css of to the dist folder:

npm run build

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i vue-piwik

Weekly Downloads

0

Version

0.1.6

License

MIT

Unpacked Size

14.5 kB

Total Files

11

Last publish

Collaborators

  • amazingdreams