mirror of
https://github.com/arthur-pbty/form.git
synced 2026-06-03 15:07:25 +02:00
ajouter le script de suivi Matomo pour l'analyse des pages
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import type { Metadata, Viewport } from "next";
|
import type { Metadata, Viewport } from "next";
|
||||||
|
import Script from "next/script";
|
||||||
import { Inter } from "next/font/google";
|
import { Inter } from "next/font/google";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import Header from "@/components/Header";
|
import Header from "@/components/Header";
|
||||||
@@ -123,6 +124,18 @@ export default function RootLayout({
|
|||||||
type="application/ld+json"
|
type="application/ld+json"
|
||||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||||
/>
|
/>
|
||||||
|
<Script id="matomo" strategy="afterInteractive">
|
||||||
|
{`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', '6']);
|
||||||
|
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>
|
||||||
</head>
|
</head>
|
||||||
<body
|
<body
|
||||||
className={`${inter.variable} font-sans antialiased bg-gray-50 min-h-screen`}
|
className={`${inter.variable} font-sans antialiased bg-gray-50 min-h-screen`}
|
||||||
|
|||||||
Reference in New Issue
Block a user