feat: ajouter le script Matomo pour le suivi des pages

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Puechberty Arthur
2026-05-02 23:39:28 +02:00
co-authored by Copilot
parent ca50a70a71
commit 5596964cfe
+15
View File
@@ -90,6 +90,19 @@ const themeScript = `
})();
`;
const matomoScript = `
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.arthurp.fr/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '8']);
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);
})();
`;
const jsonLd = {
"@context": "https://schema.org",
"@type": "Person",
@@ -124,6 +137,8 @@ export default function RootLayout({
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
{/* Matomo */}
<script dangerouslySetInnerHTML={{ __html: matomoScript }} />
</head>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}