From bcff79a91d5d3cb7254ee9292277373e9a7549cd Mon Sep 17 00:00:00 2001 From: tmdeveloper007 Date: Mon, 3 Aug 2026 15:43:31 +0000 Subject: [PATCH] chore: read GA_MEASUREMENT_ID from NEXT_PUBLIC_GA_ID env variable NEXT_PUBLIC_GA_ID is already listed in EnvExample.txt but the actual gtag.js was using a hardcoded value. Read from env first with the existing hardcoded value as fallback for backward compatibility. --- lib/gtag.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gtag.js b/lib/gtag.js index adeb84348..634f66a85 100755 --- a/lib/gtag.js +++ b/lib/gtag.js @@ -1,4 +1,5 @@ -export const GA_MEASUREMENT_ID = 'G-N8XGEXJXEM' +export const GA_MEASUREMENT_ID = + process.env.NEXT_PUBLIC_GA_ID || 'G-N8XGEXJXEM'; export const pageview = (url) => { window.gtag('config', GA_MEASUREMENT_ID, {