From 35c091f09b4eeadd40a46f75240f66382b924ebe Mon Sep 17 00:00:00 2001 From: Jatin K Malik Date: Mon, 19 Jan 2026 23:38:44 -0800 Subject: [PATCH] Add Google Analytics tracking to website (#61) * Add Google Analytics tracking to website - Add GA script tags to layout.tsx head section - Remove @next/third-parties dependency from package.json - Use measurement ID G-7NBBNJNNQ7 for tracking * Fix Google Analytics integration for static export - Use Next.js Script component instead of inline scripts - Add 'afterInteractive' strategy for optimal loading - GA scripts now properly included in static build output --- web/package.json | 2 +- web/src/app/layout.tsx | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/web/package.json b/web/package.json index d436528..1be0608 100644 --- a/web/package.json +++ b/web/package.json @@ -49,4 +49,4 @@ "prettier": "^3.3.2", "prettier-plugin-tailwindcss": "^0.6.5" } -} \ No newline at end of file +} diff --git a/web/src/app/layout.tsx b/web/src/app/layout.tsx index cbf694c..b0162ca 100644 --- a/web/src/app/layout.tsx +++ b/web/src/app/layout.tsx @@ -2,6 +2,7 @@ import "@/styles/globals.css"; import React from "react"; import { GeistSans } from "geist/font/sans"; import { type Metadata } from "next"; +import Script from "next/script"; import { ThemeProvider } from "@/components/theme-provider"; export const viewport = { @@ -145,6 +146,19 @@ export default function RootLayout({ /> + {/* Google tag (gtag.js) */} + {children}