File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { ElevationScrollAppBar } from './ElevationScrollAppBar';
1212
1313import 'highlight.js/styles/github-dark.css' ;
1414import './global.css' ;
15+ import Script from 'next/script' ;
1516
1617const geist = Geist ( {
1718 subsets : [ 'latin' ] ,
@@ -35,6 +36,22 @@ export default async function RootLayout({
3536 return (
3637 < html lang = { locale } suppressHydrationWarning className = { geist . className } >
3738 < body >
39+ < Script
40+ src = "https://www.googletagmanager.com/gtag/js?id=G-1P80WT42PB"
41+ strategy = "afterInteractive"
42+ />
43+ < Script
44+ id = "google-analytics"
45+ strategy = "afterInteractive"
46+ dangerouslySetInnerHTML = { {
47+ __html : `
48+ window.dataLayer = window.dataLayer || [];
49+ function gtag(){dataLayer.push(arguments);}
50+ gtag('js', new Date());
51+ gtag('config', 'G-1P80WT42PB');
52+ ` ,
53+ } }
54+ />
3855 < I18nProvider locale = { locale } >
3956 < AppRouterCacheProvider options = { { key : 'css' } } >
4057 < NextThemeProvider >
You can’t perform that action at this time.
0 commit comments