What is Google Tag Manager and how do I set it up?

GTM for beginners

Google Tag Manager (GTM) is a free tool from Google that allows you to track all events within your website and manage all your tags in one location. These marketing tags, small code snippets that record user actions and collect data, are important for monitoring interactions on your site. In this blog, we take you through everything you need to know about Google Tag Manager to understand it and get started yourself.

What is Google Tag Manager and how does it work?

Google Tag Manager allows you to track user interactions on your website through tags. A common example of a marketing tag is the Google tag, which is used to install Google Analytics and other Google products and services. In addition, Google Tag Manager also allows you to Administer other tracking tools such as Meta or Hotjar. The advantage of this is that you administer everything from one central point, eliminating the need to add separate HTML codes to your website for each platform. For Google Tag Manager, you only need to add code once, after which you can Admin tags and triggers in Google Tag Manager for all platforms to send user data to these platforms.

Some important terms you need to know when you start using Google Tag Manager

Tags are pieces of code that collect or activate information on your website. Here you can ask yourself what kind of code you would want to send/collect. Examples of tags include Google Analytics, Google Ads Tags, Meta-pixel, etc.
Triggers are conditions that determine when a tag should be activated. Examples of triggers are page view, click, form submission, etc.
Variables are values that can change depending on the context. You can use variables to pass information to tags or triggers.
Container: The container is where your tags reside. You have a separate container for each website.
Preview mode: In preview mode, tags can be tested before going live.
Google Analytics Tag (GA4):The Tag that collects data from a website and forwards it to Google Analytics.
Datalayer: The datalayer contains information about an operation. For example Price, quantity, Product details.

Tip: Would you like to know if your platform (Google Ads, etc.) can also be set up through Google Tag Manager? Then check out the tag gallery in Google Tag Manager.

What exactly does the data flow look like?


To illustrate how a data stream works, let’s look at measuring a GA4 purchase on a Web site. The process starts as soon as a user completes a purchase on the website. This action and its associated data are stored in a structured manner in the Data Layer. This Data Layer contains variables that contain information from the purchase, such as product details, price and quantity.
These variables are then used to set up triggers. A trigger defines the moment when a tag should be activated. In this case, a trigger is set up that responds to the purchase, detected by the relevant variables in the Data Layer.
Depending on this trigger, a specific tag can then be set up and setup, such as a GA4 purchase tag. This tag is activated as soon as the conditions of the trigger are met, i.e., when a purchase is made. This allows the purchase action to be accurately measured and recorded in GA4.

Want to know more about the datalayer read the our blog where we explain all about the Google Tag Manager Data-Layer

What is Google Tag Manager used for?

Google Tag Manager retrieves data, structures it and forwards it to relevant platforms. For example, you can use Google Tag Manager for:

  • Measure user data such as purchases
  • Tracking of form submissions from your B2B website
  • Campaigns
  • Remarketing

Structured data

In addition, Google Tag Manager can also be used to implement structured data on your website. Structured data is an extra layer of data that you add to your pages in a specific format. This makes it easy for Google to include this information in search results, which naturally causes people to click on your result!

FP56hiVml6h79TpnI2YWi6zq1WSZI5VbTzDnKY G5x5LSXyOi2fOQbeAT6YBJamwQC x8gvvMXmUusss Q5JDOEjabfujH33mKlntzD3bT0phVoqF1AXdNpH zwIs7WzyLWooH4AzYL

Server Side Tracking in conjunction with Google Tag Manager.

What is Server side tracking?

Server Side Tracking is a new way of collecting data. You set up your own server that collects data from your website. This makes you the owner of the data collected. Through this server, you then invoke Google Tag Manager. This process of data collection and transmission is known as Server Side Tracking.

Server Side Google Tag Manager.

Google Tag Manager works well with server side tracking. Google has even created a special version of Google Tag Manager, Server Side Google Tag Manager (SGTM). The benefits of using sGTM are:

  • Complete control over your data. For example, if you do not want IP addresses to be forwarded to Facebook, you can easily control this within sGTM.
  • Faster load times. Because you are firing Tags from the server, there are fewer Tags being fired client-side, reducing the loading time of a website.
  • GDPR/GDPR. By using Server Side Google Tag Manager, you are more compliant with GDPR/GDPR. To make GDPR compliance as easy as possible, TAGGRS has developed a Tool.
  • The GDPR Tool is an advanced system designed to protect personal data. This tool supports anonymizing IP addresses to prevent identification of individual users. It generates a “fake” IP address, which provides an additional layer of security and helps meet GDPR requirements. You can enable the GDPR tool in the TAGGRS dashboard for your website.

Web and server container

So you Admin all your tags and triggers in one container. When you use Server Side Tracking, an additional container comes with it – the server container.
Briefly, a Webcontainer collects data via tags that are sent directly to the user’s browser. With a server container, on the other hand, the data first goes to a server, where you then determine which data is forwarded to which platforms, such as Google Analytics.
Currently, many companies still use a method where data first goes to the webcontainer and from there is routed to the server container. However, this process is subject to change, mainly due to new laws and regulations.

How to install Google Tag Manager

The following steps explain how to create a Google Tag Manager account and link it to your website. Next, an example explains how to set up a tag, trigger and variable. The example in this case is measuring a purchase. We want to make this conversion insightful in Google Analytics: GA4. So to reproduce this example, it is important that you already have Google Analytics configured for your website.

Create an account and container

If you have not used Google Tag Manager before, you must first create an account. To do so, go to the Google Tag Manager website and select the blue “Get Started Free” button. You will then be asked to set up an account and container. So for now, we will assume that you have a business with one website. Name your account, select the country, name the container (your website name), select ‘Web’ as the target platform and click ‘Create’.

Place the Google Tag Manager code on your website

Google Tag Manager can be installed in several ways; below are 2 simple ways:

A. After creating an account and container, you will be given two pieces of code to place on each page of your website. This is the container code. Copy the first piece of code and paste it immediately after opening your -tag on each page of your website. Copy the second piece of code and paste it immediately after opening your -tag on each page.

B. If you are using a CMS such as WordPress, it is also possible to use a plugin to install Google Tag Manager. A good option when using TAGGRS is the TAGGRS WooCommerce Data Layer plugin. This not only places the Tag manager code on your website but also immediately gives you a GA4 data layer. More information about this plugin and how to install it can be found on our WooCommerce Data Layer Plugin blog.

Tag setup and triggers.

Now that you’ve linked Google Tag Manager to your website, it’s time to set up Tags and Triggers. In this step, we explain how to set up the Tag and trigger for measuring a purchase.

Tag setup

Step 1. In your workspace, click “Tags” and click “New.
Step 2. Give a name to your tag.
Step 3. Select the tag type “GA4 event. By choosing this type, you make it possible to measure and capture specific user interactions, such as purchases, directly in Google Analytics
Step 4. Enter your GA4 measurement ID. You can find these like this:

  1. log in to google analytics 4
  2. Click on admin
  3. select your property
  4. click on data stream
  5. Click on the data stream
  6. Under stream details, you see the measurement ID on the right.

step 5. Choose a trigger to fire this Tag. For example, if you want the Tag to fire when a certain page is visited, use the following trigger.
Trigger Configuration > Trigger Type: Page View > Some page views.
Since you want the Tag to be fired on a specific page, for example the thank you page, you now need to add a variable.
To do this, set the following:
Page Path contains:/Thank-you-for-your-order.
Tip: Give the trigger a distinctive name so you can easily recognize it.
Step 6. Click “Save.
Step 7. Test your Tags! This is very important because even a small spelling error will cause your Tags to not work. Testing can be done in preview mode. This option is in the upper right corner of your Google Tag Manager workspace. Once you click on this, a new tab of Tag Assistant will open, where you need to enter your website’s URL.
Next, go to the page where the tag should be fired. Then in Google Tag Manager preview mode, see if the Tag was indeed fired.
Step 8. When you have tested your Tag and it works, you can go ahead and publish the Tag. To do this, click the blue Submit button. This opens a new tab where you can include information about the new version you want to publish. Enter a descriptive name here so that in case Tags do not work you can easily find where it went wrong.
Once you have completed these steps, you are going to publish the Tags. To do this, click ‘Publish’ in the upper right corner. Your Tags are live and collecting data from that point on.

Step 9. Look in Google Analytics to see if conversions are being measured correctly. This could look like this.

It was! – Google Tag Manager setup

You now have the basics in place and are ready to optimize your Google Analytics: GA4 Configuration. You know how to set up events in GA4, how to ensure that every interaction on your website is measured correctly, and how this data is displayed in Google Analytics. Always test your setup to ensure that all events are triggered correctly and that the data appears accurately in your reports. Good luck adding more Tags and triggers!

Server Side Google Tag Manager (SGTM).

After you configure Google Tag Manager in the Web container, the next step is to set up Server Side Tracking. This starts with setting up Server Side Google Tag Manager for your various platforms. At TAGGRS, our experts have created specific templates for the most popular platforms. You can easily download these from the TAGGRS Template Gallery, which is available through your TAGGRS Dashboard. These templates enable you to quickly and flawlessly implement Server Side tracking on familiar platforms. For more information on these templates and how to apply them, read our blog on the TAGGRS Template Gallery.

template gallery

If you want to set up Server Side tracking for your own website, follow the instructions in our blog on GTM Server Side tagging.

At TAGGRS, we will guide you from start to finish in configuring your Google Tag Manager so that you can ultimately measure all of your website’s user data effectively.
Tip: when you have Server Side set up via TAGGRS, you can use additional useful tools within the TAGGRS Dashboard such as the Data Enricher that allows you to track even more data. Or a tool to anonymize IP addresses that makes you even more GDPR compliant. See all the tools in your TAGGRS dashboard!

Consent mode blocker dashboard new

What you know now

After reading this blog about Google Tag Manager (GTM), you now have a good understanding of what it is and how it works. GTM is a useful tool for Administering marketing tags and tracking user interactions on your website. You learned how to set up tags, triggers and variables and how to send collected data to platforms such as Google Analytics: GA4. In addition, you’ll know how to test your Google Tag Manager set-up in preview mode before going live to make sure everything is working correctly. You will also know how to set up Server Side tagging in Google Tag Manager and the benefits of Server Side Tracking, such as better data control and GDPR compliance. After reading this blog, you will have the necessary knowledge and steps to get started with GTM yourself, including tips for optimizing your tracking setup.

Frequently Asked Questions

Can you use Server Side Tracking without Google Tag Manager?

Yes, theoretically this is possible, only you have to set up your own Tags structure to do this. For the vast majority of companies, this is not financially feasible.

I already use Google Tag Manager, do I need to reset everything now to use Server Side Tracking?

No, this is not necessary. You can continue to use your already set up Tags and triggers; these can be customized to work with Server side tracking.

Ready for the next level?

Start with Server Side Tracking and generate more revenue and conversions in a world without third-party cookies.