feat: ajouter le script Matomo pour le suivi des analyses

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Puechberty Arthur
2026-04-29 15:58:05 +02:00
parent 5ccb305af4
commit 7c22c4f22e
+17
View File
@@ -1,4 +1,5 @@
import type { Metadata } from "next";
import Script from "next/script";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
@@ -30,6 +31,22 @@ export default function RootLayout({
<body className="min-h-full bg-app-gradient text-slate-900 dark:text-slate-100 flex flex-col">
{children}
</body>
{/* Matomo */}
<Script id="matomo" strategy="afterInteractive">
{`
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.arthurp.fr/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '7']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
`}
</Script>
</html>
);
}