Back to blog

What Is GTM (Google Tag Manager)? Setup Guide and How to Use It

与謝秀作

GTM(Googleタグマネージャー)とは?導入方法と使い方を解説

Managing tags is an unavoidable part of running web analytics and advertising campaigns. But if every tag addition or change requires a developer, executing marketing initiatives at speed becomes impossible. By adopting GTM (Google Tag Manager), marketing teams can manage tags themselves. This article covers GTM fundamentals, setup steps, and practical usage.

What Is GTM (Google Tag Manager)?

GTM (Google Tag Manager) is a free tag-management tool provided by Google. Once you place the GTM container code on your website, you can add, edit, and remove tags for Google Analytics (GA4), Google Ads, Meta Pixel, and more—all from the GTM admin panel without touching the site’s HTML.

Previously, installing analytics or ad-conversion tags required directly editing a site’s HTML source code. With GTM, marketers can set up their measurement environment quickly and independently, without relying on engineers.

Benefits of Using GTM

Here are the main benefits of adopting GTM.

Fewer Developer Requests

You no longer need to ask the development team every time a tag needs to be added or changed. Marketing staff can install new ad tags and add event tracking on their own, dramatically speeding up campaign execution.

Centralized Tag Management

GA4, Google Ads, Meta Ads, heatmap tools, and more can all be managed from a single GTM dashboard. You can see at a glance which tags fire on which pages, preventing duplicate tags and configuration gaps.

Version Control and Preview

GTM includes version control that records change history and lets you roll back to a previous version if something goes wrong. A preview mode also lets you verify tag behavior before publishing, minimizing the risk of measurement errors from misconfigurations.

Reduced Impact on Page Speed

Embedding tags individually in your site means more tags equals more load time. GTM lets you control when tags load, so you can keep the performance impact to a minimum while still capturing all necessary measurements.

Core GTM Components

To work effectively with GTM, you need to understand three building blocks: Tags, Triggers, and Variables.

Tags

Tags are the snippets of code that actually execute on your site. Common examples include the GA4 measurement tag, Google Ads conversion tag, Meta Pixel, and custom HTML tags. GTM provides templates for major tools, so creating a tag is often as simple as entering a measurement ID.

Triggers

Triggers define when a tag fires. For example: "when any page loads," "when a specific button is clicked," or "when a form is submitted." Key trigger types include Page View, Click, Form Submission, Scroll Depth, and Custom Event triggers.

Variables

Variables are dynamic values used inside tags and triggers. Examples include the current page URL, the ID of a clicked element, or a data-layer value. In addition to built-in variables (Page URL, Click ID, etc.), you can create user-defined variables to pull values from the data layer or JavaScript.

How to Set Up GTM

Getting started with GTM is straightforward. Follow the steps below.

Step 1: Create a GTM Account

Go to the Google Tag Manager website (tagmanager.google.com) and sign in with your Google account. Click "Create Account," enter an account name, then specify a container name (e.g., your site name) and select "Web" as the target platform to create the container.

Step 2: Install the Container Code

After creating the container, you will see two code snippets. Place the first snippet as high as possible inside the <head> tag on every page, and the second immediately after the opening <body> tag. If you use a CMS, you can install these via a header template or a dedicated plugin.

Step 3: Configure Tags and Publish

Once the container code is in place, start adding tags from the GTM dashboard. Create a tag, set its trigger, then use Preview mode to verify it fires correctly. If everything looks good, click "Submit," give the version a descriptive name, and publish. Including the date and a summary of changes in the version name makes future management much easier.

Practical GTM Use Cases

Below are some of the most common GTM configurations used in marketing.

Setting Up GA4

The most fundamental use of GTM is configuring GA4 (Google Analytics 4). Select the "Google Tag" template, enter your GA4 measurement ID (G-XXXXXXXX), and set the trigger to "All Pages" Page View. This enables site-wide analytics.

Conversion Tracking

Conversion tracking is essential for advertising. For example, to measure a whitepaper-request form completion as a conversion, set the trigger to fire on the thank-you page. Enter the Google Ads Conversion ID and Conversion Label in the tag, and you can accurately measure ad ROI.

Event Tracking

GA4 is built around event-based measurement. With GTM, you can send custom events to GA4 for actions like specific button clicks, file downloads, video plays, and scroll depth. For instance, to track CTA button clicks, combine a Click trigger with a GA4 Event tag.

Cross-Domain Tracking

When you need to track user behavior across multiple domains, GTM can handle cross-domain tracking. For example, you can record clicks on links that take users from your main site to an external booking site, giving you an accurate picture of the user journey.

GTM Best Practices

Keep these practices in mind to get the most out of GTM.

Standardize your naming conventions. As the number of tags and triggers grows, consistent naming becomes critical. A format like "Tool – Type – Target" (e.g., "GA4 – Page View – All Pages" or "Ads – CV – Whitepaper") keeps things clear for everyone.

Always use Preview mode before publishing. Verifying that tags fire correctly beforehand prevents data discrepancies caused by configuration mistakes. Pairing Preview mode with the Google Tag Assistant Chrome extension enables more detailed debugging.

Practice diligent version management. Give each published version a clear name (e.g., "2026-04-10_GA4 Event Added") so you can quickly identify changes and roll back if needed.

Manage access permissions carefully. GTM offers four permission levels: Admin, Editor, Approver, and Viewer. Assign permissions based on each team member’s role to prevent accidental changes or deletions.

Perform regular tag audits. Leaving unused tags in your container not only creates clutter but can also slow down page load times. Make it a habit to periodically review your tag list and pause or delete anything no longer needed.

GTM vs. Server-Side GTM

In addition to the standard web-based GTM, Google offers Server-Side GTM (sGTM). While web GTM executes tags in the user’s browser, sGTM runs tag processing on your own cloud server.

The main advantages of sGTM are resilience to cookie restrictions (such as ITP), the ability to measure data as first-party cookies, and reduced browser load. The trade-off is that it requires running a Google Cloud server, raising the setup barrier. As privacy regulations tighten, sGTM is a worthwhile option for organizations that want to maintain advertising-measurement accuracy.

Conclusion

GTM (Google Tag Manager) is a free tool that lets you manage website tags without coding, making it an indispensable part of any marketing measurement stack. Once you understand the three core components—Tags, Triggers, and Variables—you can handle everything from GA4 setup to ad conversion tracking and custom event measurement. Getting started is easy, so if you haven’t adopted GTM yet, begin with a basic GA4 configuration. For ongoing operations, standardize naming conventions, use Preview mode, maintain version control, and manage permissions carefully to keep your measurement environment stable and reliable.

Back to blog
What Is GTM (Google Tag Manager)? Setup Guide and How to Use It | Xtrategy