Skip to content

feat(analytics): migrate to GTM container, drop standalone Reo script - #51

Merged
nibzard merged 1 commit into
mainfrom
analytics/gtm-migration
Jun 5, 2026
Merged

feat(analytics): migrate to GTM container, drop standalone Reo script#51
nibzard merged 1 commit into
mainfrom
analytics/gtm-migration

Conversation

@nibzard

@nibzard nibzard commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

What

Migrates docs.steel.dev analytics onto the shared steel.dev Google Tag Manager container (GTM-TGM3B3GV), which already holds GA4, Reo, LinkedIn, X, and Clarity.

  • Loads GTM via @next/third-parties (official Next 15 helper — handles the <head> loader + <noscript> iframe for App Router/streaming).
  • Removes components/analytics/reo.tsx and its mount in app/layout.tsx. Reo now fires only from GTM, so it isn't double-counted.
  • GTM is gated on NEXT_PUBLIC_GTM_ID, so previews/forks without the var inject nothing.
  • .env-example documents the GTM var and drops the now-unused NEXT_PUBLIC_REO_CLIENT_ID.

Deploy notes

  • NEXT_PUBLIC_GTM_ID=GTM-TGM3B3GV set on Vercel (production).
  • Still TODO outside the repo: add steel.dev + docs.steel.dev to the GA4 web stream's cross-domain domain list, verify all five tags fire on a docs page in GTM Preview, and confirm Clarity text-masking is on (docs render API keys in code samples).

Load analytics via the shared steel.dev GTM container (GA4, Reo,
LinkedIn, X, Clarity) using @next/third-parties instead of the
hardcoded Reo script. Removes components/analytics/reo.tsx so Reo
fires only from GTM and isn't double-counted. GTM is gated on
NEXT_PUBLIC_GTM_ID so previews/forks without the var inject nothing.
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Building Building Preview, Comment Jun 5, 2026 1:30pm

Request Review

@nibzard
nibzard merged commit 7837ff0 into main Jun 5, 2026
2 of 3 checks passed
@nibzard
nibzard deleted the analytics/gtm-migration branch June 5, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant