mirror of
https://github.com/arthur-pbty/contact.git
synced 2026-06-03 15:07:21 +02:00
feat: ajouter le script Matomo pour le suivi des analyses
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
|
import Script from "next/script";
|
||||||
import { Geist, Geist_Mono } from "next/font/google";
|
import { Geist, Geist_Mono } from "next/font/google";
|
||||||
import "./globals.css";
|
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">
|
<body className="min-h-full bg-app-gradient text-slate-900 dark:text-slate-100 flex flex-col">
|
||||||
{children}
|
{children}
|
||||||
</body>
|
</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>
|
</html>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user