What Google Tag Manager Does
Google Tag Manager (GTM) is a free tag management system that lets you add and manage tracking code on your website without editing your site's source code. Instead of asking a developer every time you need to add a Google Analytics tag, a Facebook Pixel, or a Google Ads conversion tag, you manage them all through GTM's interface.
GTM is the foundation of professional website analytics and conversion tracking. Once installed, it gives you full control over all tracking on your site — faster, more flexibly, and with less risk of introducing code errors.
Core Concepts You Need to Know
Container
A GTM container is a single JavaScript snippet you install on your website. It loads all the tags you configure in GTM. Think of it as a box that holds all your tracking tags — you manage what goes inside the box through GTM's interface.
Tags
Tags are snippets of tracking code that send data to third-party platforms. A Google Ads Conversion Tracking tag, a GA4 event tag, or a Meta Pixel tag are all examples of tags in GTM.
Triggers
Triggers are conditions that tell GTM when to fire a tag. "Fire this Google Ads conversion tag when the URL contains /thank-you" is a trigger. "Fire this event tag when the user clicks a button with the class submit-btn" is another trigger.
Variables
Variables are dynamic values that your tags and triggers can reference. The current page URL, a value from the data layer, or a cookie value are all variables. They make your tags flexible — instead of hardcoding values, tags read them dynamically.
Step 1: Create a GTM Account and Container
- Go to tagmanager.google.com and sign in with a Google account
- Click Create Account
- Enter your company name (Account Name) and select your country
- Enter your website URL as the Container Name and select Web as the target platform
- Click Create and accept the Terms of Service
- GTM will show you two code snippets — these are your container code
Step 2: Install GTM on Your Website
GTM provides two snippets to install:
- The head snippet: a JavaScript tag that goes as high as possible in the head element of every page
- The body snippet: a noscript iframe tag that goes immediately after the opening body tag
Where you install them depends on your platform:
- WordPress: use the "Insert Headers and Footers" plugin, or add directly to your theme's header.php
- Shopify: edit theme.liquid in the theme code editor
- Custom HTML site: edit your main layout or template file
- Squarespace: paste in Settings then Advanced then Code Injection
Step 3: Verify GTM Is Installed
- In GTM, click Preview (top right)
- Enter your website URL and click Connect
- Your website opens in a new tab with a GTM debug panel at the bottom
- If the panel appears, GTM is correctly installed
- If nothing appears, check your installation — the snippets may be in the wrong location or missing from some page templates
Step 4: Set Up Your First Tag
Let us add a basic GA4 Configuration tag as a first example:
- In GTM: Tags then New
- Click Tag Configuration and select Google Tag
- Enter your GA4 Measurement ID (starts with G-)
- Click Triggering and select the "All Pages" trigger (this makes the tag fire on every page load)
- Name the tag (e.g. "GA4 - Configuration") and click Save
Step 5: Test Before Publishing
- Click Preview in GTM
- Navigate a few pages on your website
- In the debug panel, check that your GA4 Configuration tag appears under "Tags Fired" for each page view
- When satisfied, close Preview mode
Step 6: Publish Your Container
- Click Submit (top right)
- Choose "Publish and Create Version"
- Add a version name and description (e.g. "Initial GA4 setup")
- Click Publish
Your tag is now live on your website. Every future change follows the same cycle: create/edit → preview → publish.
Summary
GTM gives you control over all website tracking without touching site code. The basic workflow — create tag, set trigger, test in preview, publish — is the same whether you are adding a simple analytics tag or a complex Google Ads conversion tracking setup with enhanced conversions and data layer variables.
See our Google Tag Manager Setup and Audit service for professional GTM configuration.
Need help getting GTM set up correctly? Contact Adslytics.
Need expert tracking setup?
Our Google Tag Manager experts have delivered 500+ tracking setups with a 98% success rate.
Get a Free Consultation →