diff --git a/resources/ts/front/Components/Layout/Head.tsx b/resources/ts/front/Components/Layout/Head.tsx index 26f490b..7c0adba 100644 --- a/resources/ts/front/Components/Layout/Head.tsx +++ b/resources/ts/front/Components/Layout/Head.tsx @@ -28,7 +28,12 @@ export default function Head({ title, description }: HeadProps) { return ( {title} - {description && } + {description && ( + <> + + + + )} {title && } diff --git a/resources/ts/front/lib/cookie.ts b/resources/ts/front/lib/cookie.ts index cace10e..c27570b 100644 --- a/resources/ts/front/lib/cookie.ts +++ b/resources/ts/front/lib/cookie.ts @@ -293,6 +293,14 @@ export const createServiceHandlers = ( ); return; } + // If the script is already in the DOM, Matomo is already running — do not + // re-push into _paq (would trigger "setTrackerUrl/setSiteId registered more + // than once" warnings caused by applyDecidedStatuses being called multiple times). + // Added 13/07/2026 + if (document.getElementById("script-matomo")) { + notifyConsentChange("matomo", accepted); + return; + } const w = window; w._paq = w._paq ?? []; w._paq.push(["trackPageView"]);