From f04513a1cb996a4bbfbb97bfc3ae169a265d20d4 Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Thu, 1 Feb 2024 19:59:55 +0100
Subject: [PATCH] activate plausible

---
 nuxt.config.ts    |  6 +++++-
 package-lock.json | 22 ++++++++++++++++++++++
 package.json      |  1 +
 3 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/nuxt.config.ts b/nuxt.config.ts
index d8236d43..e38c481e 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -8,7 +8,7 @@ export default defineNuxtConfig({
     '@vueuse/nuxt',
     '@pinia/nuxt',
     'nuxt-meilisearch',
-
+    '@nuxtjs/plausible',
   ],
   content: {
     documentDriven: {
@@ -45,6 +45,10 @@ export default defineNuxtConfig({
     searchApiKey: 'api_key',
     serverSideUsage: false // default false
   },
+  plausible: {
+    apiHost: 'https://plausible.pasteur.cloud',
+    enableAutoOutboundTracking: true
+  },
   devtools: {
     enabled: false
   },
diff --git a/package-lock.json b/package-lock.json
index ad32d19a..f45aa992 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,6 +24,7 @@
         "@iconify-json/tabler": "^1.1.103",
         "@iconify-json/vscode-icons": "^1.1.32",
         "@nuxt/content": "^2.10.0",
+        "@nuxtjs/plausible": "^0.2.4",
         "@types/node": "^20.11.0",
         "@unocss/nuxt": "^0.58.3",
         "@unocss/preset-icons": "^0.58.3",
@@ -2097,6 +2098,18 @@
         "unist-util-visit": "^5.0.0"
       }
     },
+    "node_modules/@nuxtjs/plausible": {
+      "version": "0.2.4",
+      "resolved": "https://registry.npmjs.org/@nuxtjs/plausible/-/plausible-0.2.4.tgz",
+      "integrity": "sha512-9HrSl9ZGKS/7bULAt8uzAGo9BJyIZebzRSLQD8ZhiODaGyRdEQlgcJBw5JgUzjcC5n4T0ZlX3FC6C3Wyp7opgA==",
+      "dev": true,
+      "dependencies": {
+        "@nuxt/kit": "^3.8.2",
+        "defu": "^6.1.3",
+        "pathe": "^1.1.1",
+        "plausible-tracker": "^0.3.8"
+      }
+    },
     "node_modules/@observablehq/plot": {
       "version": "0.6.13",
       "license": "ISC",
@@ -11647,6 +11660,15 @@
         "pathe": "^1.1.0"
       }
     },
+    "node_modules/plausible-tracker": {
+      "version": "0.3.8",
+      "resolved": "https://registry.npmjs.org/plausible-tracker/-/plausible-tracker-0.3.8.tgz",
+      "integrity": "sha512-lmOWYQ7s9KOUJ1R+YTOR3HrjdbxIS2Z4de0P/Jx2dQPteznJl2eX3tXxKClpvbfyGP59B5bbhW8ftN59HbbFSg==",
+      "dev": true,
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/postcss": {
       "version": "8.4.33",
       "funding": [
diff --git a/package.json b/package.json
index 7339b301..00a6ee24 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
     "@iconify-json/tabler": "^1.1.103",
     "@iconify-json/vscode-icons": "^1.1.32",
     "@nuxt/content": "^2.10.0",
+    "@nuxtjs/plausible": "^0.2.4",
     "@types/node": "^20.11.0",
     "@unocss/nuxt": "^0.58.3",
     "@unocss/preset-icons": "^0.58.3",
-- 
GitLab