"We wanted to add an analytics tag to our website, but had to wait two weeks for an engineer to become available"—have you ever experienced this? Or perhaps as ad tags and chat tool scripts accumulate, your site has slowed down and management has become unwieldy.
Google Tag Manager (GTM) solves these issues. With GTM, once you embed a small code snippet on your site, all subsequent tag additions, updates, and removals can be handled directly from your browser's management console. Its greatest strength is enabling non-technical staff to operate securely without needing an engineer.
In this article, we explain basic GTM concepts through practical steps for account creation, GA4 tag setup, and publishing in a clear way that small business web managers and executives can implement starting today.
What is Google Tag Manager?
GTM is a free tag management system (TMS) provided by Google. It is a centralized platform for managing various tracking codes (tags) deployed on websites, adopted by organizations worldwide since its release in 2012.
Without a tag management system, you must edit the HTML file and re-upload it to the server every time a tag is added. With GTM implemented, once the GTM snippet is embedded into the HTML, all future work is completed entirely within the GTM interface.
Benefits of using GTM
| Pros | Specific benefits |
|---|---|
| No engineer required | Non-technical users can add and modify tags right in the browser |
| Faster turnaround | Reduces lead time for tag changes from several days to same-day |
| Centralized tag management | Manage GA4, ads, chat tools, and more from a single screen |
| Version control | Change history is preserved; roll back immediately if an issue arises |
| Preview mode | Verify behavior prior to publishing to avoid production issues |
| Free to use | Zero cost with an existing Google account |
The three core concepts of GTM
To understand GTM, you need to master three elements: tags, triggers, and variables. Measurement data is transmitted through these three working together as a set.
Tags
A tag is code defining "what to do." For example, actions like "send a page view to GA4" or "track a Google Ads conversion" correspond to tags. GTM provides pre-built templates for GA4, Google Ads, Meta Pixel, and more, letting you configure them without writing code.
Triggers
A trigger is a condition defining "when to fire the tag." You can define detailed criteria such as "on all page loads," "when opening an inquiry form thank-you page," or "when clicking a specific button."
Variables
A variable defines "what value to use." It dynamically retrieves values like page URLs, clicked element text, or form inputs, allowing tags and triggers to reference them.
To summarize their relationship: you "capture values with variables, evaluate conditions with triggers, and execute tags." This flow forms the core mechanism of GTM.
GTM implementation steps (account creation to code installation)
Now let's walk through the actual steps to get started with GTM.
Step 1: Create a GTM account
- Visit tagmanager.google.com and log in with your Google account
- Click "Create Account"
- Account Name: Enter your company name (e.g., Example Co., Ltd.)
- Container Name: Enter the URL of the site to manage (e.g., example.com)
- Target Platform: Select "Web"
- Click "Create" → Agree to the Terms of Service
Think of accounts as created per company and containers per website. If you run multiple websites, you create multiple containers inside a single account.
Step 2: Install code on your site
After creating an account, two code snippets will appear. Install these into your site's HTML just once.
<!-- コード①:<head> 内の できるだけ上部に貼る -->
<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-XXXXXXX');</script>
<!-- コード②:<body> 開始タグの直後に貼る -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
Replace GTM-XXXXXXX with your own container ID. For WordPress sites, using a plugin such as "Insert Headers and Footers" lets you install the code without directly editing HTML.
Key point: This initial code installation is the only task requiring an engineer. Once installed, all subsequent work is handled entirely inside the GTM management interface.
Setting up GA4 tags in GTM
Let's configure GA4 (Google Analytics 4) page view tracking using GTM. First, make sure you have your GA4 Measurement ID (formatted as G-XXXXXXXXXX) ready.
How to find your Measurement ID
In GA4 Admin → "Admin" → "Data collection and modification" → "Data streams" → click the target stream → check the Measurement ID
Setup steps in GTM
- In the GTM admin console, click "Tags" → "New"
- Enter a tag name (e.g., "GA4 - Page View Tracking")
- Select "Google Tag" as the tag type
- Enter
G-XXXXXXXXXXinto the Measurement ID field - Select "All Pages" for the trigger
- Click "Save" in the top right
Verifying behavior with Preview
Always verify in preview mode prior to publishing.
- Click "Preview" in the top right of the GTM console
- Enter your site's URL and click "Connect"
- The site will open in a separate tab, displaying the GTM debug panel
- If "GA4 - Page View Tracking" appears under "Tags Fired" in the tag list, setup succeeded
If there are no issues, return to the GTM console, click "Submit," enter a version name, and click "Publish" to complete.
Common use case: Tracking inquiry form completions
After implementing GTM, the first application you should try is conversion tracking. By sending inquiry form thank-you page completions to GA4, you can accurately track how many inquiries you are receiving.
Setup flow
- Create new tag: Select "Google Analytics: GA4 Event" as the tag type
- Measurement ID: Enter the same GA4 Measurement ID as before
- Event Name:
generate_lead(the recommended GA4 event name for inquiries) - Create a new trigger:
- Trigger Type: "Page View"
- Firing Conditions: "Page URL" contains
thank-youorcontact-thanks
- Save → Verify with Preview → Publish
With this alone, inquiry numbers will register in GA4 conversion reports. If running ads, this measurement data can be used to calculate return on ad spend (ROAS).
Best practices for operating GTM
To manage GTM safely and efficiently, keep the following points in mind.
Standardize naming conventions
As tags, triggers, and variables multiply, naming becomes vital. Establishing a standardized rule like "[ツール名] - [計測内容] - [発火条件]" makes future reviews much easier.
Example: GA4 - リンククリック - ヘッダーCTA
Always test in Preview before publishing
Skipping preview risks broken tracking or double-counting due to configuration mistakes. Build a habit of verifying functionality in preview with every change.
Make use of version control
GTM features version control, saving a snapshot upon every publish. Because you can quickly roll back to an earlier version if issues arise, you can experiment without fear.
Periodically audit accumulated tags
Retaining obsolete tags hurts performance. Review your tag inventory roughly once every six months to clean up unnecessary items.
Check related articles on GA4 and Astro integration
As a next step after implementing GTM tracking, learning how to interpret GA4 data will accelerate your site improvement decisions.
- 5 Metrics to Watch in GA4: An Introduction to Web Analytics — Explaining basic GA4 metrics and reading methods for beginners
- Production GA4 Implementation Guide for Astro Sites — Setting up GTM and GA4 in SSG (static site) environments
Conclusion
Here is a recap of key points regarding Google Tag Manager.
| Key point | Details |
|---|---|
| What is GTM? | A free tool by Google for centralized tag management |
| Greatest benefit | Add and change tags same-day without needing engineers |
| Core concepts | Tags (what to do), Triggers (when), Variables (what values) |
| Implementation flow | Create account → Install code (once) → Configure tags → Preview → Publish |
| First use case | GA4 page view tracking and inquiry conversion tracking |
Mastering GTM significantly accelerates your marketing initiative cycle. Move away from "we need a tag changed but have to wait for an engineer..." and build an internal system capable of making data-driven management decisions independently.
Whether you want to try setting up GTM internally but need help with the initial code installation, or want to build robust conversion tracking integrated with GA4, please feel free to reach out to GleamHub.







