[AAASM-3552] 📈 (docs): Wire GA4 analytics into the Docusaurus site#177
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
|
Claude Code — review result ✅ CI green — full suite passes (17 checks: build, coverage, module-smoke, test 18/20/22/24 ubuntu, CodeQL, SonarCloud). No fails to ignore. Scope vs AAASM-3552 (node-sdk site) — covered. Wires GA4 Ready for approval + merge. Note: gtag sets cookies and there's no consent UI on this site yet — a cookie-consent banner is correctly flagged as a fast-follow. |



Target
Task summary:
Wire Google Analytics 4 into the Node SDK Docusaurus docs site so we can measure documentation traffic. Uses the
gtagsupport built into@docusaurus/preset-classic(already a dependency), so no new package is added.Task tickets:
Key point change (optional):
Added a
gtagblock to the classic preset options inwebsite/docusaurus.config.ts:G-6FHQKGLDE4is public (it ships in client-side HTML by design), so committing it directly is safe.anonymizeIP: truetruncates the visitor IP before it reaches Google.Effecting Scope
Docs-site config only. No SDK runtime, API, or type changes.
Description
gtagblock (trackingID: G-6FHQKGLDE4,anonymizeIP: true) to thepreset-classicoptions inwebsite/docusaurus.config.ts.pnpm buildsucceeds (installed viapnpm install --ignore-workspaceper the documented docs-build path) and thatG-6FHQKGLDE4(thegtag/js?id=...loader) is emitted into every page underwebsite/build/.Closes AAASM-3552.