Publishing and Versions
Using the new version of Google Tag Manager? Read the updated version of this article.
Changes made to a container do not take effect on a site or mobile app until you publish the container. So, once you've added or edited tags, rules, and macros in a container, you'll need to publish the container in order to make your additions and changes live on the site/app.
To publish a container, navigate to Versions > Overview. Select a version from the table. Click Publish.
Bitesize Training Video
Watch this clip to learn about:
- How to enter Preview & Debug mode
- How to check whether your tags fired successfully
- How to make your changes live by creating a new version of your container
- How to create a new version of your container
- How to make your changes live using publishing
A version is essentially a snapshot of a container. You can save the current state of a container as a version at any time. This allows you to save and preserve your work and go back to a previous version if you need to.
Saving a version is independent of publishing. You can save versions at any time and you never need to publish a version unless you want to. However, you cannot publish a container without first saving it as a version. As a result, you'll have a saved version of anything that has been previously published. This can make it easier to recover from mistakes. For example, if someone accidentally publishes a container version before it's ready for production, you can simply publish another version that has been debugged and is known to work.
To save the current state of the container as a version, go to Container Draft > Overview in the left navigation, and click Create Version. A new version will be created with a new Container Version ID. To name the version and add notes, go to Versions > Overview and click the Version ID in the table. Click Edit to add a Container Version Name and Notes.
To publish a previously saved version of a container to the site, go to Versions > Overview in the left navigation. Click the desired version in the table, then click Publish. Google Tag Manager maintains a Publish history, so you can see when versions were live and who published them. To see the Publish history, go to Versions > Overview.
To replace the current container version with a previously saved version, go to Versions > Overview. Click the Version ID of the desired version and click the "Restore version" button (top center right of screen, next to the "Delete version" button). Restoring a container version replaces the current container draft with the content of the container version you've selected. This action does not change the published container version.