Skip to content

Commit

Permalink
Merge pull request #75 from CodeChefVIT/staging
Browse files Browse the repository at this point in the history
feat:google analytics
  • Loading branch information
NishantGupt786 authored Nov 29, 2024
2 parents ad7c93a + c2b9f40 commit 81a1cc8
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import "@/styles/globals.css";
import { Toaster } from "react-hot-toast";
import { ThemeProvider } from "@/components/theme-provider";
import { GeistSans } from "geist/font/sans";
import Script from "next/script";
import { Metadata } from "next";
import { Analytics } from "@vercel/analytics/next";

export const metadata: Metadata = {
metadataBase: new URL("https://papers.codechefvit.com/"),
Expand Down Expand Up @@ -95,6 +95,18 @@ export default function RootLayout({
name="google-site-verification"
content="SjVFuH8GzIj3Ooh2JcWufBoSMWTzo77TACHomonCKVs"
/>
<head>
<Script
async
src="https://www.googletagmanager.com/gtag/js?id=G-J5CD036GJP"
></Script>
<Script id="google-analytics">
{`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-J5CD036GJP');`}
</Script>
</head>
<body>
<ThemeProvider
attribute="class"
Expand All @@ -104,7 +116,6 @@ export default function RootLayout({
>
<Toaster position="top-right" reverseOrder={false} />
{children}
<Analytics />
</ThemeProvider>
</body>
</html>
Expand Down

0 comments on commit 81a1cc8

Please sign in to comment.