npm install plausible-vue
Import the plugin and initiate it with Vue.use
:
import Plausible from "plausible-vue"
import Vue from "vue"
Vue.use(Plausible)
You can conditionally disable analytics using the disable
option:
Vue.use(Plausible, { disable: process.env.NODE_ENV !== "production" })