Google Tag Manager: what it is, how to install it and why you need it

Learn how Google Tag Manager works: tags, triggers, variables, container installation, testing and publishing changes.

45Views

Google Tag Manager: what it is, how to install it and why you need it

Google Tag Manager (GTM) is a free Google service for adding and updating analytics and advertising codes on a website: Google Analytics 4, Google Ads tag, Meta Pixel and TikTok Pixel. A developer installs the container code once, and the marketer then manages all tags through a web interface without editing website files. This makes it easier to track leads, phone number clicks and purchases. Mistakes can be reversed in a minute.

Why your website needs Tag Manager

Imagine a typical situation. You launch Google Ads, start advertising on Instagram a month later, and then decide to try TikTok. Each platform provides its own tracking code. You need to install each code and set up tracking for the "Order" button. Without GTM, every change requires a developer. With GTM, the marketer handles these tasks independently, and all tracking codes are stored in one place.

What a container offers in practice:

  • tracking actions not covered by standard analytics: phone number clicks, clicks on Telegram links, specific form submissions and price list downloads;
  • quick activation and removal of advertising pixels without changing website code;
  • version history: see who changed what and restore previous settings;
  • preview mode for testing changes before publication;
  • separate access permissions: contractors get access to the container rather than the website server.

People often confuse GTM with Analytics. Tag Manager does not calculate statistics or display reports. It only sends data to the relevant systems. You view statistics in Google Analytics and conversions in Google Ads or your Meta ad account.

Tags, triggers and variables explained

Google Tag Manager is built around three concepts.

A tag is a piece of code that sends data: an event to Analytics, a conversion to Google Ads or an event to Meta Pixel. A trigger is a condition that activates a tag: "any page loads", "someone clicks a link starting with tel:" or "someone submits a form on the contact page". A variable is a value used by a tag or trigger: the page URL, button text or order amount.

Here are a few more terms you will encounter in the interface. A container is a collection of all tags for one website, usually one per domain. A workspace is a draft where you edit tags. It does not affect the live website until you publish it. A version is a snapshot of the container settings at a specific point in time. Online stores also need a dataLayer: it allows the website to send shopping cart and purchase data to GTM.

How to install Google Tag Manager

  1. Go to tagmanager.google.com and sign in with your Google account.
  2. Open the Accounts tab and click Create Account. Enter your company name and country.
  3. In the container setup section, enter your website address as the container name and select Web. Other types (iOS, Android, AMP, Server) are intended for mobile apps and server-side tracking. A standard website does not need them.
  4. Click Create and accept the terms of service.
  5. GTM will display two code snippets with an ID in the GTM-XXXXXXX format. Place the first as high as possible in the head section and the second immediately after the opening body tag. The code must appear on every website page.

Many CMS platforms have a dedicated field for the GTM ID, so there is no need to insert the code manually. Use a company email address to create the account and grant contractors access as users. This way, you will not lose your container when a freelancer leaves.

Your first tags: Analytics and phone click tracking

Google Analytics 4 is usually the first tag to configure. Create a new Google tag in your workspace and enter the data stream ID starting with G-. Select a trigger that fires on all pages. If the same tag is already installed directly in the website code, remove one copy. Otherwise, page views will be counted twice.

Another useful tag tracks phone number clicks. Here's how to set it up:

  1. Enable the built-in Click URL variable in the Variables section.
  2. Create a link click trigger with the following condition: Click URL contains "tel:".
  3. Create a GA4 event tag named, for example, phone_click and assign this trigger to it.
  4. After publishing, mark phone_click as a key event in Analytics.

The same method works for tracking Viber or Telegram link clicks, form submissions and views of the "Thank you for your order" page.

Testing and publishing

No GTM changes go live until you publish them. First, click Preview in the upper-right corner. Tag Assistant will open. Enter your website address and click Connect. The website will open in a separate tab in debug mode. Navigate through pages, click the phone number and submit a test form. Tag Assistant will show which tags fired, which did not and why. Only you can see this mode. Regular visitors will not notice anything. To show the results to a colleague or contractor, use the Share feature in Tag Assistant to create a link to the preview session.

When everything works, click Submit, keep the Publish and Create Version option selected, give the version a descriptive name ("Phone clicks and contact form") and click Publish. If something breaks after publication, you can publish an earlier version from the Versions section.

When you do not need GTM and what to watch out for

For a brochure website that only needs basic statistics, installing Google Analytics directly is enough. Tag Manager becomes useful when you run ads, use multiple pixels and need to track specific actions. The standard version is free. The paid Tag Manager 360 includes features such as approval of changes before publication. It is designed for large companies, and small businesses generally do not need it.

There are risks too. Anyone with container publishing permissions can add any script to your website, so restrict these permissions to a small group of people. Dozens of outdated tags from completed campaigns slow down pages, so clean up the container every few months. The most common problem is duplicate tracking: the same code appears in both the container and the website template.

How WID7 can help

We install Google Tag Manager on websites and configure Analytics, Google Ads and Meta tags, along with tracking for calls, messaging apps and form submissions. If you already have a container but the figures in your ad accounts do not match your leads, order an advertising audit from UAH 3,000. We will check tags, triggers, duplicate tracking and conversion data. Full advertising setup services are available on our Google Ads and Facebook and Instagram advertising pages, from UAH 5,000, excluding the advertising budget.

Rate this article

Other articles

loading