Skip to content

Commit

Permalink
added ga code
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudLun committed Apr 1, 2024
1 parent 2940cfb commit b6eb0e2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'

import Script from 'next/script'


const roboto = Inter({subsets:['latin']})

Expand All @@ -19,6 +21,15 @@ export default function RootLayout({
return (
<html lang="en">
<head>
<Script async src="https://www.googletagmanager.com/gtag/js?id=G-CCN79CWRX0" />
<Script id="google-analytics">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-CCN79CWRX0');
`}
</Script>
<link
href="https://api.mapbox.com/mapbox-gl-js/v2.15.0/mapbox-gl.css"
rel="stylesheet"
Expand All @@ -28,3 +39,4 @@ export default function RootLayout({
</html>
)
}

0 comments on commit b6eb0e2

Please sign in to comment.