Skip to content
IT glossary
Data and MLUpdated December 3, 2026

Google Tag Manager

Google Tag Manager lets teams control when a website runs analytics and advertising tags. Once installed, it can change how existing site events are sent without requiring a new website release.

Also known as: GTM

What Google Tag Manager does

Google Tag Manager (GTM) is a tool for managing measurement and advertising tags. A tag can load a script or send an event to another service. For example, GTM can send a lead event to Google Analytics 4 (GA4) when a demo request succeeds. GTM decides when to send the event and what to include; GA4 receives it and provides reports.

How a web container works

A developer installs the GTM web container snippet on the site. The container configuration has three main parts:

  • Tags define the action, such as sending a GA4 event.
  • Triggers define when a tag should fire, such as when GTM sees a particular custom event.
  • Variables supply values, such as the type of form submitted. Tags can include those values in an event, and triggers can use them to decide whether to fire.

The application can pass structured messages to GTM through dataLayer, a JavaScript array. Teams can preview container changes with Tag Assistant before publishing a new version. That lets them change how an existing event is used without redeploying the site. If the site doesn't yet expose the action or the data they need, a code change may still be necessary.

Example: measure a completed demo request

Once the server confirms that it accepted the request, the application adds this message to the data layer:

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  event: 'lead_submitted',
  form_type: 'demo'
});

A Custom Event trigger in GTM listens for lead_submitted. It fires a GA4 event tag configured to send generate_lead, with form_type read through a Data Layer Variable. The push alone does not send anything to GA4. Keeping the site event separate from the destination event lets the team change the reporting name without changing application code.

Common mistakes

GTM is often used to measure ad conversions and build product funnels. In both cases, count the outcome that matters: a submit-button click measures an attempt, not a successful request. A trigger based on a CSS selector may also stop working after a redesign, even if the form itself still works.

Watch for duplicate events when the application and GTM both send the same event. Don't send form contents such as email addresses or phone numbers to analytics tags. A tag manager isn't a consent banner: connect it to the site's consent mechanism and test tag behavior both when users grant consent and when they decline.

How it comes up in interviews

A web analytics interviewer might ask why successful form submissions aren't showing up in GA4. Trace one test submission end to end: check that the application pushes the expected event, that the trigger matches, and that the tag fires with the right destination and parameters. Then check the browser's network request and look for the event in GA4 DebugView with debug mode enabled. A tag marked as fired in Tag Assistant is not proof that GA4 received the event.