Skip to content

Commit

Permalink
matomo only for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
lsagetlethias committed Sep 4, 2024
1 parent 9747cde commit a261efb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/utils/Matomo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Matomo = ({ env, nonce }: MatomoProps) => {
const [previousPath, setPreviousPath] = useState("");

useEffect(() => {
if (env === "dev") {
if (env !== "prod") {
return;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit a261efb

Please sign in to comment.