From 9a8a39f9c59e385430e527e16c6419fdc0e0fee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anne=20L=27H=C3=B4te?= Date: Fri, 29 Mar 2024 15:21:30 +0100 Subject: [PATCH] fix(tracking): Disable tracking in development mode --- client/src/main.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/main.jsx b/client/src/main.jsx index 6859f9fe..df3e5dac 100644 --- a/client/src/main.jsx +++ b/client/src/main.jsx @@ -11,14 +11,13 @@ import { ToastContextProvider } from './hooks/useToast'; import './styles/index.scss'; import 'react-tooltip/dist/react-tooltip.css'; -const { VITE_APP_MATOMO_BASE_URL, VITE_APP_MATOMO_SITE_ID = 0 } = import.meta.env; +const { MODE, VITE_APP_MATOMO_BASE_URL, VITE_APP_MATOMO_SITE_ID } = import.meta.env; const queryClient = new QueryClient(); -const matomo = createInstance({ +const matomo = MODE === 'development' ? undefined : createInstance({ urlBase: VITE_APP_MATOMO_BASE_URL, siteId: VITE_APP_MATOMO_SITE_ID, - disabled: VITE_APP_MATOMO_SITE_ID === 0, configurations: { disableCookies: true, },