File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import GlobalHeader from '@/components/GlobalHeader/GlobalHeader';
99import { SnowOverlayProvider } from '@/providers/SnowOverlayProvider' ;
1010import SnowOverlayWrapper from '@/components/SnowOverlayWrapper/SnowOverlayWrapper' ;
1111import AuthContextProvider from '@/context/AuthContextProvider' ;
12+ import Script from 'next/script' ;
1213
1314const geistSans = localFont ( {
1415 src : './fonts/GeistVF.woff' ,
@@ -38,6 +39,20 @@ const RootLayout = ({
3839} > ) : JSX . Element => {
3940 return (
4041 < html lang = "en" >
42+ < head >
43+ < Script
44+ src = { `https://www.googletagmanager.com/gtag/js?id=${ process . env . NEXT_PUBLIC_GOOGLE_ANALYTICS_ID } ` }
45+ strategy = "afterInteractive"
46+ />
47+ < Script id = "google-analytics" strategy = "afterInteractive" >
48+ { `
49+ window.dataLayer = window.dataLayer || [];
50+ function gtag(){dataLayer.push(arguments);}
51+ gtag('js', new Date());
52+ gtag('config', '${ process . env . NEXT_PUBLIC_GOOGLE_ANALYTICS_ID } ');
53+ ` }
54+ </ Script >
55+ </ head >
4156 < body
4257 className = { `${ geistSans . variable } ${ geistMono . variable } antialiased bg-gradient` }
4358 >
You can’t perform that action at this time.
0 commit comments