File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { ThemeProvider } from "@/components/theme-provider";
55import { Analytics } from "@vercel/analytics/next" ;
66import { SITE_URL } from "@/lib/constants" ;
77import { FestiveModal } from "@/components/FestiveModal" ;
8+ import Script from "next/script" ;
89
910const geistSans = Geist ( {
1011 variable : "--font-geist-sans" ,
@@ -69,6 +70,19 @@ export default function RootLayout({
6970 < body
7071 className = { `${ geistSans . variable } ${ geistMono . variable } antialiased` }
7172 >
73+ { /* ✅ Google Analytics script */ }
74+ < Script
75+ src = "https://www.googletagmanager.com/gtag/js?id=G-MRZ0D7MXZD"
76+ strategy = "afterInteractive"
77+ />
78+ < Script id = "google-analytics" strategy = "afterInteractive" >
79+ { `
80+ window.dataLayer = window.dataLayer || [];
81+ function gtag(){dataLayer.push(arguments);}
82+ gtag('js', new Date());
83+ gtag('config', 'G-MRZ0D7MXZD');
84+ ` }
85+ </ Script >
7286 < ThemeProvider
7387 attribute = "class"
7488 defaultTheme = "dark"
You can’t perform that action at this time.
0 commit comments