Blog
Export the workspace JSON to git on every change. Diffs become reviewable, rollbacks become reproducible.
GTM stores your workspace state internally and presents it through a UI. The state is also exportable as JSON, which means you can put it in git and treat tag manager changes like any other code change. Most teams do not bother. The teams that do find it transforms how they manage tag complexity.
In GTM, Admin > Export Container. You get a JSON file with every tag, trigger, variable, and built-in setting. It is verbose but human-readable enough to diff.
For sGTM specifically, the same export works on the server-side container. The structure is the same; the tag templates and clients are different.
Set up a daily job (cron, GitHub Action, your CI of choice) that:
gtm/server-container.json).After a few weeks, your git history shows every change to the container, who made it, and when. Plus diffs.
The JSON is verbose but the meaningful diffs are small. A new tag adds 10-20 lines. A trigger change shows up clearly. Renamed variables, modified tag parameters, all visible in standard git diff output.
Add a CODEOWNERS file mapping the GTM JSON to the people responsible. Tag changes are now reviewable in pull requests.
If you need to roll back to a state in git, the GTM Import Container function takes the same JSON format. Import overwrites the workspace; review the diff before publishing.
This is a much more powerful rollback than the GTM Versions tab, because git history goes back further and includes the per-change context.
For teams running multiple regional containers, the diff check is especially valuable as a drift detector.