From a261efb83c5073bcdd1ba4224256557884c3aa88 Mon Sep 17 00:00:00 2001 From: Lilian Saget-Lethias Date: Wed, 4 Sep 2024 15:38:22 +0200 Subject: [PATCH] matomo only for prod --- src/components/utils/Matomo.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/utils/Matomo.tsx b/src/components/utils/Matomo.tsx index c867e06e..84376de8 100644 --- a/src/components/utils/Matomo.tsx +++ b/src/components/utils/Matomo.tsx @@ -24,7 +24,7 @@ export const Matomo = ({ env, nonce }: MatomoProps) => { const [previousPath, setPreviousPath] = useState(""); useEffect(() => { - if (env === "dev") { + if (env !== "prod") { return; } @@ -58,7 +58,7 @@ export const Matomo = ({ env, nonce }: MatomoProps) => { /* The @socialgouv/matomo-next does not work with next 13 */ useEffect(() => { - if (!pathname || !matomoConsent || env === "dev") { + if (!pathname || !matomoConsent || env !== "prod") { return; }