From 18b3b01cba818560495b697d9fdf5bbd5210ea97 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 4 Sep 2026 00:50:58 +0000 Subject: [PATCH] fix(analytics): load GA4 tag only on production hosts Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- marketing/analytics-access.md | 4 ++++ projects/docs/src/index.html | 13 +++++++++---- projects/web-site/src/index.html | 13 +++++++++---- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/marketing/analytics-access.md b/marketing/analytics-access.md index 834bf24..abcbd73 100644 --- a/marketing/analytics-access.md +++ b/marketing/analytics-access.md @@ -27,6 +27,10 @@ one-time setup. ## GA4 events +Both apps load `gtag.js` only when the page hostname is `rdlabo.dev` or one of its subdomains. +Local development (`localhost`, `127.0.0.1`) and preview hosts define the `gtag` stub but never +load the tag, so their page views and clicks do not reach the property. + The site emits these events from article pages: | Event | Meaning | diff --git a/projects/docs/src/index.html b/projects/docs/src/index.html index 2e415dd..dcb1fa1 100644 --- a/projects/docs/src/index.html +++ b/projects/docs/src/index.html @@ -12,15 +12,20 @@ - - +
diff --git a/projects/web-site/src/index.html b/projects/web-site/src/index.html index f01d780..c1c3462 100644 --- a/projects/web-site/src/index.html +++ b/projects/web-site/src/index.html @@ -18,15 +18,20 @@ - - +