matomo.client.ts 847 B

12345678910111213141516171819202122232425
  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:
  11. process.env.NODE_ENV === 'production'
  12. ? OPENTALENT_PROD_ID
  13. : OPENTALENT_TEST_ID,
  14. enableLinkTracking: true,
  15. requireConsent: false, // Mettre à true si vous avez besoin du consentement RGPD
  16. trackInitialView: true,
  17. disableCookies: false, // Mettre à true pour respecter certaines règles RGPD
  18. requireCookieConsent: false, // Mettre à true pour demander le consentement pour les cookies
  19. debug: process.env.NODE_ENV !== 'production',
  20. trackSiteSearch: true,
  21. })
  22. })