Skip to content

Commit 9977ca4

Browse files
Merge pull request #141 from CodeChefVIT/analytics
Analytics
2 parents 677e872 + f77ab01 commit 9977ca4

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/app/layout.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
21
import { Pangolin, Poppins, Inter } from "next/font/google";
32
import "./globals.css";
43
import SessionProviderWrapper from "./SessionProvider";
54
import ServiceWorkerRegister from "../components/ServiceWorkerRegister/ServiceWorkerRegister";
5+
import Script from "next/script";
66

77
const pangolin = Pangolin({
88
weight: "400",
@@ -64,6 +64,19 @@ export default function RootLayout({
6464
}: Readonly<{ children: React.ReactNode }>) {
6565
return (
6666
<html lang="en">
67+
<head>
68+
<Script
69+
async
70+
src="https://www.googletagmanager.com/gtag/js?id=G-ZC8LE59L8H"
71+
></Script>
72+
<Script>
73+
{`window.dataLayer = window.dataLayer || [];
74+
function gtag(){dataLayer.push(arguments);}
75+
gtag('js', new Date());
76+
77+
gtag('config', 'G-ZC8LE59L8H');`}
78+
</Script>
79+
</head>
6780
<body
6881
className={`${pangolin.variable} ${poppins.variable} ${inter.variable} antialiased bg-[#CEE4E5] select-none`}
6982
>
@@ -73,4 +86,3 @@ export default function RootLayout({
7386
</html>
7487
);
7588
}
76-

0 commit comments

Comments
 (0)