Notes and reverse-engineering-style documentation for Google Tag Manager runtimes: how compiled client and server-side containers load, route events, and execute built-in Google tags (GA4, Google Ads, Conversion Linker, and related modules).
This repository is for learning and analysis. It is not affiliated with Google. Container snippets use placeholder measurement IDs and sanitized config where noted in the subfolder docs. The documentation and commentary here are informal research notes.
| Directory | Contents |
|---|---|
| client-side-gtm | Prettified gtm.js plus markdown walkthroughs of the browser container (resource, triggers, tag order, per-tag behavior). |
| server-side-gtm | Prettified server_container.js, server_bootstrap.js, and deep dives into sGTM clients, tags, modules, consent, and cookies. |
| Track | Entry point |
|---|---|
| Client GTM | client-side-gtm/README.md — index; for the main overview see gtm_summary.md. |
| Server GTM | server-side-gtm/README.md — structure of server_container.js, line maps, and links to client/tag docs. |
- A runnable product or replacement for GTM.
- Live credentials, real container IDs, or production tagging advice.
- Guaranteed parity with every GTM release; compiled output changes over time.
JavaScript sources under client-side-gtm/ and server-side-gtm/ retain Google copyright headers where present. Analytical markdown in this repo is project documentation unless otherwise noted.
No warranty. Everything is provided “as is,” without warranty of any kind, express or implied.