matomo-uniapp
v1.0.4
Published
Matomo Plugin for UniApp
Downloads
109
Readme
Matomo Plugin for UniApp
This Matomo plugin is designed for UniApp.
Installation
npm install matomo-uniapp
Usage
import App from './App'
import Matomo from 'matomo-uniapp'
Vue.use(Matomo, {
url: 'https://your-matomo-instance.com',
siteId: 1,
})
const app = new Vue({
...App
})
app.$mount()
//When the user logs in, set the user ID.
matomo.setUserId('example-user-id');
API
new Matomo(options)
options
(Object):url
(String): The URL of your Matomo instance.siteId
(Number): The ID of the site you want to track.
matomo.setUserId(userId)
userId
(String): Defines the User ID for this request. The User ID is any non-empty unique string identifying the user (such as an email address or a username).