Browse Source

Merge branch 'feature/V8-6995-v2' into develop

Olivier Massot 7 tháng trước cách đây
mục cha
commit
5acfd7f68f
3 tập tin đã thay đổi với 31 bổ sung0 xóa
  1. 1 0
      package.json
  2. 22 0
      plugins/matomo.client.ts
  3. 8 0
      yarn.lock

+ 1 - 0
package.json

@@ -51,6 +51,7 @@
     "uuid": "^9.0.1",
     "vite-plugin-vuetify": "^2.0.4",
     "vue-advanced-cropper": "^2.8.9",
+    "vue-matomo": "^4.2.0",
     "vue-tel-input-vuetify": "^1.5.3",
     "vue-the-mask": "^0.11.1",
     "vuetify": "3.6.14",

+ 22 - 0
plugins/matomo.client.ts

@@ -0,0 +1,22 @@
+import VueMatomo from 'vue-matomo'
+
+const OPENTALENT_PROD_ID = 196
+const OPENTALENT_TEST_ID = 197
+
+export default defineNuxtPlugin((nuxtApp) => {
+  const router = useRouter()
+
+  // @see https://github.com/AmazingDreams/vue-matomo
+  nuxtApp.vueApp.use(VueMatomo, {
+    router,
+    host: 'https://stats.2iopenservice.com/',
+    siteId: process.env.NODE_ENV === 'production' ? OPENTALENT_PROD_ID : OPENTALENT_TEST_ID,
+    enableLinkTracking: true,
+    requireConsent: false, // Mettre à true si vous avez besoin du consentement RGPD
+    trackInitialView: true,
+    disableCookies: false, // Mettre à true pour respecter certaines règles RGPD
+    requireCookieConsent: false, // Mettre à true pour demander le consentement pour les cookies
+    debug: process.env.NODE_ENV !== 'production',
+    trackSiteSearch: true
+  })
+})

+ 8 - 0
yarn.lock

@@ -3952,6 +3952,7 @@ __metadata:
     vitest: "npm:3.0.4"
     vue-advanced-cropper: "npm:^2.8.9"
     vue-jest: "npm:^3.0.7"
+    vue-matomo: "npm:^4.2.0"
     vue-tel-input-vuetify: "npm:^1.5.3"
     vue-the-mask: "npm:^0.11.1"
     vuetify: "npm:3.6.14"
@@ -14019,6 +14020,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"vue-matomo@npm:^4.2.0":
+  version: 4.2.0
+  resolution: "vue-matomo@npm:4.2.0"
+  checksum: 10c0/c611d2c9be0145f225f3422e8551568593d9d8cbf7c26cf212663f81a3acbb73b348115356def9582f7f3b9ef8c9088b4eeccb8cb4d6afc53bfc559d53066653
+  languageName: node
+  linkType: hard
+
 "vue-router@npm:^4.5.0":
   version: 4.5.0
   resolution: "vue-router@npm:4.5.0"