Account and container
- What it is
- Google's API documentation says each Account can have one or more Containers, and each Container can have one or more Workspaces
Google Tag Manager lets you add and update tags on your site without editing site code each time. What it does, how the data layer fits in, and common mistakes.
Google Tag Manager (GTM) is a tag management system that lets you configure and deploy tags on your website or mobile app from a web interface. You add the container code and a data layer to your pages, then manage tags, triggers, and variables in Tag Manager, preview your changes, and publish them as a version.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
Google describes Tag Manager as "a tag management system that lets you configure and deploy tags on your website or mobile app, from an easy-to-use web interface." Without editing your site code, you can use it to add and update Google Ads, Google Analytics, Floodlight, and third-party tags.
Tag Manager delivers tags. The tags send data to tools such as Google Analytics 4. Google lists tag organization, version control, support for multiple tag types, community-developed tag templates, enterprise collaboration, and security features among the reasons to use it.
A common pattern: one container per site, a Google Analytics tag that fires on all pages, and separate tags with click or form triggers for the actions you want measured.
Create an account and a web container in the Tag Manager interface. The container ID has the form GTM-XXXXXX.
For web page installations Google says you must create a data layer. Establish it before the Tag Manager snippet loads, as in the code below.
In a workspace, add a tag and attach the trigger that decides when it fires.
Preview your workspace changes before they go live. Publishing creates a Version.
<script>
window.dataLayer = window.dataLayer || [];
</script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->Tag Manager processes data layer messages one at a time, in the order received. A gtag() or dataLayer.push() call made by page code, a custom template, or a Custom HTML tag is queued behind pending messages, so Google says updated data layer values are not guaranteed to be available for the next event. Add an event name to the pushed message and listen for it with a Custom Event trigger.
Google also says not to use Custom HTML tags to deploy gtag.js-based code. Use Tag Manager's native tag templates instead.
4 questions people ask next, answered from the sources on this page.
Google says Tag Manager lets you add and update tags without editing your site code. A web installation still needs the container snippet and a data layer on the page, and custom data layer work can need developer help.
No. Tag Manager delivers tags. Google Analytics is one of the tools those tags can send data to.
Yes. The Google Tag Manager API gives an authorized user access to configuration data, including accounts, containers, tags, triggers, variables, and user permissions.
Google says Server-Side Tagging lets you move tag code off your website or app and into the Cloud, and that it can help improve performance and security while serving dependent assets from your own domain.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.