Google Tag Manager Frequently Asked Questions

What is the dataLayer?

The dataLayer is a JavaScript array on window that GTM and gtag.js use to receive structured data from the page. Pages push events and variables onto it via dataLayer.push({...}), and GTM listens for those pushes to fire matching tags and triggers.

What is the standard dataLayer for ecommerce tracking?

The standard ecommerce dataLayer in GTM uses an ecommerce object containing an items array, where each item describes a product with fields like item_id, item_name, price, and quantity. The full object also includes a currency field and event-specific fields like value for purchases or transaction_id for orders.

What is a Google Tag Manager container?

A container is the top-level workspace in GTM that holds all your tags, triggers, and variables for a single property. It compiles to a snippet you place on your site, and every published version is versioned so you can roll back changes without redeploying code.

What is a GTM template?

A GTM template is a reusable definition of a custom tag or variable, packaged with its UI, permissions, and sandboxed JavaScript. Built-in templates cover most major vendors, and you can import community templates from the Template Gallery or build your own for proprietary integrations.

What is Meta server-side tracking?

Meta server-side tracking sends conversion events directly from your server to Meta's Conversions API, bypassing the browser-side Pixel entirely. The standard implementation uses server-side GTM as the relay: the client container forwards events to your sGTM endpoint, which transforms and forwards them to Meta with hashed user data.

How do you publish a GTM container?

Publishing a container takes the current workspace, creates a versioned snapshot, and pushes it live to every page running the GTM snippet. From the workspace overview, click Submit, name the version, click Publish, and the new version reaches end users within seconds.

What is server-side Google Tag Manager?

Server-side GTM is a second container that runs on a server you control, receiving events from your client-side container and forwarding them to vendors like GA4, Meta, or Google Ads. It moves network requests off the user's browser, which improves page performance, hides third-party endpoints from ad blockers, and lets you enrich or filter data before it leaves your infrastructure.

How do you track HubSpot form submissions?

HubSpot Forms V4 emits an hs-form-event:on-submission:success custom event on the document, exposing the form ID and submission data through the HubSpotFormsV4 instance API. You listen for the event in GTM via a custom HTML tag, push a form_submit event to the dataLayer, and forward it to GA4 with the form ID as a parameter.