Accounts, containers and workspaces
The three layers nest. An account belongs to an organisation and holds containers plus the people who can administer them. A container holds everything that runs on one site or app: tags, triggers, variables, folders, the version history and the environments. A workspace is a draft inside a container, a set of changes made against the latest version that becomes a version of its own when it is published.
| Layer | What it holds | How many you usually need | Typical mistake |
|---|---|---|---|
| Account | Containers, account-level users, settings for the paid tier | One per organisation | One account per agency or per person, so access leaves when they do |
| Container | Tags, triggers, variables, folders, versions, environments | One per site, app or platform | One container shared across unrelated sites, or a new container for every microsite |
| Workspace | A draft set of changes against the latest version | One per piece of work in progress | Everyone editing the default workspace at once |
The account should be owned by the business, not by whoever set it up. Agencies and contractors are added to the business's account, never the other way round, because a container created in an agency's account can be exported but not moved, and the version history and permissions stay behind. Containers inside an account are independent of each other: a change in one never affects another, and each has its own public ID, the string beginning with GTM- that appears in the snippet. Workspaces are where day-to-day work happens, and the free product allows a small, documented number of them to exist at once; the paid enterprise tier removes that limit and adds approval workflows. Google's Tag Manager overview, listed in the sources, describes the structure; the rest of this guide is about what each layer is for in practice.
Container types and the snippet
When a container is created it is given a type: web, iOS, Android, AMP or server. The type decides what the container can contain and how it is installed, and it cannot be changed afterwards. Almost everything on this site concerns web containers. Server containers run in an environment you host rather than in the browser, and the server-side tagging guide covers when they are worth the operational cost.
A web container is installed with a snippet in two parts. The first is a short script placed as high in the
page's head as possible. It creates the data layer array if the page has not already done so, then loads the
container's JavaScript asynchronously, so the page does not wait for it. The second part is a noscript
element containing an iframe, placed immediately after the opening body tag, which serves as a fallback for
browsers with JavaScript disabled. Both carry the container's public ID. The snippet goes into every
template, including checkout, account and error pages; a container that is missing from the pages where
conversions happen is the single most common installation fault.
Content management systems and e-commerce platforms usually offer a field or plugin that inserts the snippet.
These are convenient, but check what they actually output: some add the snippet twice, some place it at the
end of the body where page-level data layer pushes may arrive too late, and some inject their own data layer
with key names that do not match your plan. If the site already carries a direct gtag.js snippet for
GA4Google's event-based analytics platform., decide which of the two will own the GA4 configuration before installing the container,
because running both produces duplicate page views. The GA4 through GTM tutorial
takes the container route and explains what to remove from the page.
Workspaces: parallel changes without conflicts
Every change to a container is made inside a workspace. A new container has a default workspace; you can create more, and each starts as a copy of the latest version. Changes made in one workspace are invisible to the others until they are published. That is the point: an analyst adding GA4 events, a developer wiring a consent banner and an agency installing a new ad pixel can all work in the same container at the same time without overwriting one another's half-finished work.
A workspace shows a list of its changes against the latest version, and that list is what gets reviewed before publishing. When another workspace publishes first, yours falls behind, and Tag Manager prompts you to update. Updating merges the newer version into your workspace. Where both sides changed the same tag, trigger or variable, the interface flags a conflict and asks you to resolve it, entity by entity, by choosing which side to keep. Conflicts are rarely dramatic in practice, but they are avoidable: keep workspaces short-lived, name them after the piece of work they contain, and publish or abandon them rather than leaving them open for weeks.
Two habits keep workspaces useful. First, one workspace per piece of work, so that the change list reads as a single coherent release. A workspace that mixes a new conversion tag with a trigger clean-up and a quick fix for a vendor cannot be reviewed or rolled back as a unit. Second, publish from a workspace only after it has been previewed, which the debugging tutorial covers; preview runs the workspace's draft, so the thing you test is exactly the thing you are about to release. If you hit the limit on open workspaces, that is a sign that work is being started faster than it is being finished, not a reason to ask for more.
Versions, publishing and rollback
A version is an immutable snapshot of the whole container at a moment in time. Versions are created from a workspace in one of two ways: publishing, which creates the version and makes it live at once, or creating a version without publishing, which records the snapshot for review or for release through an environment later. Either way the workspace's changes are folded into the new version, the workspace's change list is cleared, and other workspaces are now behind by one version. Each version has a name and a description, and filling those in is not optional housekeeping: a version named only by its number tells nobody what changed. The GTM container publish checklist is the short list to run before each publish, including the check that the workspace is not behind the live version.
The container distinguishes the live version, which the snippet serves to visitors, from the latest version, which may be newer if someone created a version without publishing it. The version list shows every version ever created with who created it and when. Opening an older version shows its full contents, and publishing it makes it live again: that is how rollback works. Nothing is deleted or overwritten; publishing an older version creates a new version identical to it, so the history keeps moving forward and the broken release stays available for inspection.
A container can also be exported as a file and imported into another container, either merging with what is there or overwriting it, into a workspace rather than directly into the live version. Exports are the way to back up a container before a large change, to copy a set of tags between a staging and a production container that are kept separate, and to hand a container to a new owner.
A Friday release that had to be rolled back
A travel agency's analyst publishes version 48 at 16:40 on a Friday. It adds a GA4 event tag for brochure downloads and, in the same workspace, tidies three old triggers. One of the tidied triggers was also attached to the Google Ads conversion tag for enquiries, and the tidy-up narrowed it to a path that no longer exists. By Monday the Ads account shows 0 conversions over the weekend against a usual 60 to 70, and a smart bidding campaign has started to cut bids. The fix takes four minutes: open version 47 in the version list, publish it, and conversions resume on the next page load. The analyst then recreates the brochure tag in a fresh workspace with the trigger clean-up left for a separate release, and version 49 goes out on Tuesday with a note that names the tag added and the triggers deliberately left alone.
Environments
An environment is a destination that a version can be published to. Every container has two built in: live, which is what the standard snippet loads, and latest, which always points at the most recent version whether or not it has been published. You can add custom environments, typically named after the stages a site passes through on its way to production: development, staging, QA. Each custom environment can be reached in two ways: a variant of the container snippet that includes the environment's own parameters, which you install on the matching site, or a shareable preview link that loads that environment's version in the browser without changing the installed snippet.
The release flow this enables is the same one developers use for code. A version is created in a workspace, published to staging, tested there against the staging site's data layer, and then published to live. The built-in Environment Name variable lets a tag behave differently per environment, which is how a single container can send staging traffic to a test GA4 property and live traffic to the real one without maintaining two copies of every tag. Two cautions apply. The environment snippet contains authorisation parameters, so it must never be deployed to the production templates. And an environment is not a substitute for preview mode: preview shows what fired and why on one browser; an environment shows whether the version behaves on a whole site that other people are also testing.
Permissions
Permissions are set at two levels, and both matter. At account level a person is either a user, who can see the account and the containers they have been granted, or an administrator, who can also manage users and create containers. At container level each person has one of a small set of rights that build on each other.
| Container permission | What it allows | Who usually holds it |
|---|---|---|
| No access | The container does not appear for this person | Default for anyone not working on this site |
| Read | View tags, triggers, variables and versions; cannot change anything | Stakeholders, auditors, new joiners |
| Edit | Create workspaces and make changes; cannot create versions or publish | Analysts and agency staff doing the work |
| Approve | Edit plus create versions; cannot publish | A reviewer who checks changes before release |
| Publish | Everything, including making a version live | The container owner and one deputy |
Grant rights to named Google accounts, never to a shared login, so that the version history records who did what. Agencies and vendors get container-level rights on the containers they work on, not account administration, and their access is removed the day the engagement ends. The gap between edit and publish is the most useful one in the list: it lets many people build and few people release, which is the simplest control there is against the Friday-afternoon publish that breaks the figures the business tracks as its headline measures (KPIA metric tied directly to an objective.). Who should hold which right, how changes are reviewed and how access is audited over time are questions of policy, and the governance guide answers them. The mechanics of what a tag, trigger or variable actually is start in the building blocks guide.
Common mistakes
- Container in the agency's account. When the engagement ends the business discovers it owns nothing. Create the account under the business and grant access outwards.
- Snippet missing from the pages that matter. Checkout, thank-you and account pages on a different template, with no container, so conversions never fire. Check every template, not the home page.
- Everyone in the default workspace. Half-finished changes from three people ship together in one version that nobody can describe. One workspace per piece of work.
- Versions without notes. Rollback means guessing which of the last ten versions was the good one. Name every version by what it changed.
- Publishing without preview. The workspace looked right in the change list, but the trigger condition had a typo. Preview is the test; the change list is not.
- Environment snippet on production. The staging snippet, with its authorisation parameters, pasted into the live template because it was the one in the clipboard.
- Publish rights for everyone. Convenient until the first silent breakage. Edit for many, publish for few, and read the expertise page on Tag Manager for how that looks in a working set-up. The Tag Manager hub lists the other guides in this section.
