1.0.1 • Published 5 months ago
matomo-reuse v1.0.1
Matomo Plugin for UniApp
This Matomo plugin is designed for UniApp.
Installation
npm install matomo-reuse
Usage
import { createApp } from 'vue'
import VueMatomo from 'matomo-reuse'
import App from './App.vue'
createApp(App)
.use(VueMatomo, {
// Configure your matomo server and site by providing
host: '{YOUR_MATOMO_INSTANCE_URL}',
siteId: {YOUR_SITE_ID},
})
.mount('#app')
//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).