From aa06660a979db7513b39085369d11768e24989c7 Mon Sep 17 00:00:00 2001 From: GigaHierz Date: Mon, 31 Aug 2026 22:29:27 +0100 Subject: [PATCH 1/6] feat(analytics): route GA4 through GTM and instrument engagement events Swap the bare ga4 integration in docs.json for GTM (tagId placeholder until the container is created), fire dataLayer events from AddNetworkButton for the add-network conversion, and document the measurement setup in ANALYTICS.md: GTM/GA4 runbooks for humans and a Cloudflare AI Crawl Control runbook for bot/agent traffic, which no client-side tag can see. Co-Authored-By: Claude Fable 5 --- AGENTS.md | 1 + ANALYTICS.md | 80 +++++++++++++++++++++++++++++++++++ docs.json | 4 +- snippets/AddNetworkButton.jsx | 22 ++++++++-- 4 files changed, 101 insertions(+), 6 deletions(-) create mode 100644 ANALYTICS.md diff --git a/AGENTS.md b/AGENTS.md index a56badb36..0eff48bbc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,6 +12,7 @@ Structural work in progress is tracked in the restructure epic, [#2266](https:// - `snippets/` holds reusable JSX/MDX (`/snippets/ColoredText.jsx`, `/snippets/YouTube.jsx`, `/snippets/AddNetworkButton.jsx`). Import with an absolute path after the frontmatter: `import {YouTube} from '/snippets/YouTube.jsx'`. - Static assets: `img/`, `images/`, `assets/`, `logo/`. - **Any `.js` file under the content root runs on every published page.** Mintlify injects them automatically — there is no allowlist and no way to scope one to a single page — and the same applies to `.css`. Treat a `.js` file here as production code shipped to every reader, not as content: it has full same-origin DOM access on pages that print contract addresses and RPC endpoints. Mintlify does not support a raw `