matomo.client.ts 824 B

12345678910111213141516171819202122
  1. import VueMatomo from 'vue-matomo'
  2. const OPENTALENT_PROD_ID = 196
  3. const OPENTALENT_TEST_ID = 197
  4. export default defineNuxtPlugin((nuxtApp) => {
  5. const router = useRouter()
  6. // @see https://github.com/AmazingDreams/vue-matomo
  7. nuxtApp.vueApp.use(VueMatomo, {
  8. router,
  9. host: 'https://stats.2iopenservice.com/',
  10. siteId: process.env.NODE_ENV === 'production' ? OPENTALENT_PROD_ID : OPENTALENT_TEST_ID,
  11. enableLinkTracking: true,
  12. requireConsent: false, // Mettre à true si vous avez besoin du consentement RGPD
  13. trackInitialView: true,
  14. disableCookies: false, // Mettre à true pour respecter certaines règles RGPD
  15. requireCookieConsent: false, // Mettre à true pour demander le consentement pour les cookies
  16. debug: process.env.NODE_ENV !== 'production',
  17. trackSiteSearch: true
  18. })
  19. })