Closed karimennassiri closed 1 year ago
you can set it via env (.env
) and publicRuntimeConfig (nuxt.config.js
) variable, and then in plugins/matomo.config.js
something like that:
import Vue from 'vue' import VueMatomo from 'vue-matomo'
export default ({ app, route, $config }) => {
if ($config.matomoUrl) {
Vue.use(VueMatomo, {
router: app.router,
host: $config.matomoUrl,
siteId: route.fullPath.includes('/site-one') ? $config.matomoSiteOneId : $config.matomoSiteTwoId,
trackInitialView: false
})
}
}
Hi everyone
I've installed the matomo vue module for my Nuxt project
the question is, is there any way to configure the site id dynamicly ?
I'm using the same base code for multiple domaine (with different content)