Stape
Search
Contact salesTry for free

Set up Google Tag Manager and GTM tags in 5 minutes

Uliana Lesiv

Uliana Lesiv

Author
Published
Sep 10, 2025

In this article, we will explore key Google Tag Manager concepts and show how to set up web and server GTM containers. Also, we will present the Setup Assistant developed by Stape. It is a free tool that helps configure data tracking for selected platforms in no time. It's a user-friendly solution for beginners and advanced users who want to cut the time spent on data tracking configuration.

To set it up, simply choose the platforms you want to track and provide data for your web and server Google Tag Manager (GTM) containers. The tool will then automatically add pre-built templates to your GTM account.

What is Google Tag Manager?

Google Tag Manager (GTM) is a tag management solution developed by Google that makes it easier to handle tracking codes on your website. It allows you to manage all your tags in one centralized interface. Using GTM eliminates the need for adding code manually to your website's HTML, making it simpler to manage the data tracking process.

Key Google Tag Manager concepts

Containers

A container is a small piece of code that you add to your website. It's responsible for loading all the tags you configure in the Google Tag Manager interface.

There are two types of containers in GTM - web and server. A web and a server GTM containers are both used for managing tracking tags, but they operate in different ways. The key difference lies in where the processing of data occurs: in the user's browser (client-side) or on a cloud server (server-side).

Web GTM runs directly in a visitor's browser. When someone lands on your site, their browser loads tracking scripts such as Google Analytics, Meta Pixel, or TikTok tags. Each of these scripts then sends data straight to its respective platform. The benefit of this method is that it is fast to set up. The drawback is its limitations. They include blocking or restricting tracking codes by ad blockers and browser restrictions (such as ITPs). This leads to data loss.

Server GTM sends events to a cloud server where your GTM server container is hosted. From there, you can clean, filter, or enrich the data before forwarding it to each platform. This reduces data loss, bypasses browser restrictions, and limits direct exposure to third-party scripts.

Server-side tracking doesn't fully replace browser tracking. The browser still collects most of the data; the difference is that it passes through your server first, ensuring higher data quality and secure delivery.

Web vs Server GTM container
Web vs Server GTM container

Tags

A tag is a piece of code that transmits data to other platforms (such as Google Analytics 4, Meta, Google Ads, TikTok, etc.). The purpose of tags is to capture an event data object, format it appropriately, and then send it to the designated platform's servers.

Tags section in GTM
Tags section in GTM

Stape is the largest contributor to the tag library. Over 100 tags were approved and added to the web and server GTM library. Check Stape's tags in the GTM template gallery or on GitHub.

Tags developed by Stape
Tags developed by Stape

Triggers

Triggers control when and how tags are activated. They specify the conditions that must be met for a tag to run. By configuring triggers, you make sure the correct tags fire at the appropriate moments, allowing you to capture the intended user interactions.

Triggers section in GTM
Triggers section in GTM

Variables

Variables extract specific information from incoming HTTP requests and make that data available to other components of the GTM container (tags, triggers, and clients). Variables can be used not only in tags and triggers but also within other variables.

A variable can also contain some data or settings, for example, Meta Pixel ID or Google Analytics 4 Measurement ID. While configuring the tags, you can use the variables with required data to avoid adding it manually every time.

Variables in GTM
Variables in GTM

Clients

The Clients section is present in the server GTM container only. Client is responsible for receiving incoming HTTP requests, transforming them into event data, and returning a response. After processing the request, the Client makes the data within it accessible for tags and triggers in the Google Tag Manager server container.

Clients section in server GTM
Clients section in server GTM

Transformations

The Transformations section is also present in the server GTM container only. Transformation is an entity that serves as an intermediary between the client and the tag.

Data is sent to the sGTM container via an incoming HTTP request. When a client processes this request, it converts the data into event information that tags, triggers, or variables can use within sGTM.

Transformations allow you to add, remove, or modify event parameters after the Client has processed the incoming HTTP request but before the tag accesses the data.

Transformations section in server GTM
Transformations section in server GTM

How to set up Google Tag Manager?

How to set up a web GTM container

1. Go to Google Tag Manager and sign in to your Google account.

2. In the tab Accounts, click Create account.

Create account in GTM
Create account in GTM

3. Add a name for the account, choose the country location for it, name the container, and select the target platform (in this case, it is web). Click Create.

Create web GTM  container
Create web GTM  container

4. Accept data processing terms.

Data Processing Terms
Data Processing Terms

5. Install Google Tag Manager on your website according to the given instructions.

Install GTM
Install GTM

Please note: The GTM code snippet must be placed into every page of your website. It can be done manually, but it takes too much time if you have a lot of pages. For this purpose, you can use plugins on the marketplace of the CMS you use or one of Stape's apps. They are primarily aimed at configuring server-side tracking, but with their help, you can also add a GTM snippet automatically:

How to configure the server GTM container

To configure the server GTM container, you will need:

  • Configured web GTM container as we showed above;
  • Hosting provider for the server GTM container. One of the popular options is hosting directly on Google Cloud Platform (GCP), but it may end up being a more expensive and harder-to-use solution, especially for new users. So, Stape is a cheaper and user-friendly alternative to GCP.

Server GTM container configuration is a more complex process compared to the web container. It includes the following steps:

  1. Creating a server GTM container within Google Tag Manager.
  2. Hosting the container on Stape.
  3. Configuring a custom tagging server URL to set up first-party cookies.
  4. Creating a Google Tag inside the Web GTM container.
  5. Configuring the GA4 Client inside the server GTM container to send data from the web to the server GTM container.
  6. Activating Stape's power-ups, such as Custom Loader and Cookie Keeper, to make tracking codes less affected by ad blockers and browser restrictions.

We have a comprehensive guide on server GTM container configuration. In this article, we will briefly describe the steps. For the detailed instructions, please refer to that guide.

How to set up GTM tags in a standard way?

Selecting tags for the platforms is a challenging and time-consuming task. For your convenience, we have gathered tags for popular platforms and GTM best practices in one article.

The standard way to configure tags in a web or server GTM container includes the following steps:

1. Select the tag that works for the required platform. They can be found in the Templates section of the GTM container. Click on Search Gallery → search for the tag that works for your platform → add a template to the workspace.

Search template gallery
Search template gallery

Alternatively, if there is a tag that isn't present on the GTM Template Gallery yet, you should add it manually to the workspace. To do it, in the Templates section → click NewImport the file with tag template.

Import template to GTM
Import template to GTM

Create a new tag and choose the tag you added as the tag configuration. As an example, we use the Facebook Conversions API tag.

Add Facebook Conversions API tag
Add Facebook Conversions API tag

3. Configure a tag. You should fill in the necessary fields and add settings that meet your tracking needs. If you would like to configure the Facebook Conversions API tag, please check the configuration guide on Meta CAPI.

Facebook CAPI tag configuration example
Facebook CAPI tag configuration example

4. Add a trigger. Specify conditions that must be met for a tag to run.

5. Test and debug the setup. After configuring the tag, you should check whether it works correctly. It can be done using Preview in the GTM container. After the successful testing, submit the changes.

Preview in GTM
Preview in GTM

Set up GTM tags with Setup Assistant

The manual tag configuration process is time-consuming, especially if you have multiple platforms that you need to configure data collection for. That's why the Stape team has created Setup Assistant - a free tool that generates Google Tag Manager pre-made container templates based on the platforms you specify while configuring Setup Assistant. After generating the templates, they can be automatically imported into your web and server GTM containers.

Setup Assistant has multiple benefits, such as tailored tracking, fast launch of data tracking for multiple platforms, easy and completely free to use. It will be a handy solution for both GTM experts and those who are just getting started with Google Tag Manager.

Most popular CMS platforms are supported (Shopify, WordPress, Magento 2, BigCommerce, Wix, PrestaShop, Salla), and you have an option to configure Setup Assistant for a custom website if your platform isn't on the list.

You can generate ready-to-use templates for the following platforms:

  • Google Analytics 4
  • Google Ads
  • Facebook (Meta)
  • Microsoft Ads (Bing)
  • LinkedIn
  • Snapchat
  • TikTok
  • Pinterest

For more info on Setup Assistant and how to set it up, please check our guide.

Setup Assistant configuration process
Setup Assistant configuration process

The tool can be found in the menu of your Stape account. To complete the setup, you just need to specify the platforms you need tracking for, add data on the web/server GTM containers, and pre-built templates will be added automatically into your GTM account.

FAQs

Want to switch to the server side?Register now!

author

Uliana Lesiv

Author

Uliana is a Content Manager at Stape, specializing in analytics and integration setups. She breaks down complex tracking concepts into clear insights, helping businesses optimize data collection.

Comments

Try Stape for all things server-side