From 29b9259340b7a06c53bfa9dc5b1108ada4d23776 Mon Sep 17 00:00:00 2001 From: Parth Date: Tue, 24 Feb 2026 10:11:14 -0500 Subject: [PATCH] fix(web): render GTM component only in production --- apps/web/components/analytics/gtm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/components/analytics/gtm.tsx b/apps/web/components/analytics/gtm.tsx index 2c20c6d..5b181d4 100644 --- a/apps/web/components/analytics/gtm.tsx +++ b/apps/web/components/analytics/gtm.tsx @@ -5,8 +5,9 @@ import Script from "next/script"; import { COOKIE_CONSENT_STORAGE_KEY } from "./consent"; export function GTM() { + const isProduction = process.env.NODE_ENV === "production"; const gtmId = process.env.NEXT_PUBLIC_GTM_ID; - if (!gtmId) { + if (!isProduction || !gtmId) { return null; }