File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Footer from '@/components/footer'
44import Header from '@/components/header'
55import AuthProvider from '@/context/session-provider'
66import { Analytics } from '@vercel/analytics/next'
7+ import Script from 'next/script'
78
89const inter = Inter ( { subsets : [ 'latin' ] } )
910
@@ -23,9 +24,23 @@ export default function RootLayout({ children }) {
2324 < AuthProvider >
2425 < Header />
2526 { children }
26- < Analytics />
2727 < Footer />
28+ < Analytics />
2829 </ AuthProvider >
30+
31+ { /* Google Analytics */ }
32+ < Script
33+ src = "https://www.googletagmanager.com/gtag/js?id=G-FRS93SLW90"
34+ strategy = "afterInteractive"
35+ />
36+ < Script id = "google-analytics" strategy = "afterInteractive" >
37+ { `
38+ window.dataLayer = window.dataLayer || [];
39+ function gtag(){dataLayer.push(arguments);}
40+ gtag('js', new Date());
41+ gtag('config', 'G-FRS93SLW90');
42+ ` }
43+ </ Script >
2944 </ body >
3045 </ html >
3146 )
You can’t perform that action at this time.
0 commit comments