Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
vue-matomo
Advanced tools
Link your Piwik/Matomo installation
npm install --save vue-matomo
import Vue from 'vue'
import VueMatomo from 'vue-matomo'
Vue.use(VueMatomo, {
// Configure your matomo server and site
host: 'https://matomo.example.com',
siteId: 5,
// Enables automatically registering pageviews on the router
router: router,
// Require consent before sending tracking information to matomo
// Default: false
requireConsent: true,
// Whether to track the initial page view
// Default: true
trackInitialView: true
})
// Now you can access piwik api in components through
this.$matomo
// or
window._paq.push
// or through
window.Piwik.getTracker
For available operations see the matomo api docs
<!-- Include after Vue -->
<!-- Local files -->
<script src="vue-matomo/dist/vue-matomo.js"></script>
<!-- From CDN -->
<script src="https://unpkg.com/vue-matomo"></script>
Bundle the js and css of to the dist
folder:
npm run build
FAQs
Link your Piwik/Matomo installation
The npm package vue-matomo receives a total of 18,359 weekly downloads. As such, vue-matomo popularity was classified as popular.
We found that vue-matomo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.