Skip to content

Commit d2d0d13

Browse files
committed
Add GA tags.
1 parent 7836012 commit d2d0d13

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/app/[locale]/layout.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@ export default function LocaleLayout({
8787
href="https://unpkg.com/[email protected]/dist/leaflet.css"
8888
/>
8989
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
90+
91+
{/* Google tag (gtag.js) */}
92+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SVNC88Q13K"></script>
93+
<script dangerouslySetInnerHTML={{
94+
__html: `
95+
window.dataLayer = window.dataLayer || [];
96+
function gtag(){dataLayer.push(arguments);}
97+
gtag('js', new Date());
98+
gtag('config', 'G-SVNC88Q13K');
99+
`,
100+
}} />
90101
</head>
91102
<body
92103
className={`bg-background text-black ${lato.className}`}>

0 commit comments

Comments
 (0)