1 parent 664edef commit af248beCopy full SHA for af248be
1 file changed
app/layout.tsx
@@ -79,6 +79,19 @@ export default function RootLayout({ children }: RootLayoutProps) {
79
crossOrigin="anonymous"
80
strategy="afterInteractive"
81
/>
82
+ {/* Google Analytics 4 */}
83
+ <Script
84
+ src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"
85
+ strategy="afterInteractive"
86
+ />
87
+ <Script id="google-analytics" strategy="afterInteractive">
88
+ {`
89
+ window.dataLayer = window.dataLayer || [];
90
+ function gtag(){dataLayer.push(arguments);}
91
+ gtag('js', new Date());
92
+ gtag('config', 'G-XXXXXXXXXX');
93
+ `}
94
+ </Script>
95
</head>
96
<body className="bg-white text-gray-900 antialiased">
97
<div className="min-h-screen flex flex-col">
0 commit comments