Online Marketing Blog

The Google Tag Manager

Google Tag Manager
Table of contents

The Google Tag Manager makes it easier to implement Google Analytics and Google Ads on your website. But not only Google tools can be integrated with the Tag Manager, the Tag Management System also includes third-party tools. A complete list of the tools that can be implemented via the Tag Manager can be found here.

After installing or implementing the Google Tag Manager in your page source code, you have the option of integrating code snippets such as tracking codes or conversion pixels into the website or mobile app without having to make changes directly in the source code. This means that it is no longer necessary to update the page source code for every change. Tags can be easily managed and configured via the web interface.

Once the Tag Manager is integrated on a website, it records all interactions that take place there and sends them to the tools integrated in the Tag Manager. The recorded data is then analyzed in the respective tool.

To summarize the whole thing again: The Google Tag Manager acts as a container through which code snippets such as tracking codes or conversion pixels can be implemented in the website or mobile app.

Advantages of the Google Tag Manager

Thanks to the simple administration and configuration of tags via the browser user interface, the Tag Manager also offers users without programming knowledge the opportunity to implement tags or make changes. In companies, this means more independence from IT and relieves the burden on IT at the same time. The quick and easy implementation and configuration via the Tag Manager also saves a lot of time and therefore costs.

The Tag Manager offers the user a central location where all tags from different tools can be managed. This provides a better overview of the code snippets used, such as tracking codes or conversion pixels. In addition, changes made can be tested immediately via the preview before they are finally implemented.

No changes need to be made to the source code when implementing or changing the tags via the Tag Manager. This reduces the susceptibility to errors when using the Tag Manager.

The installation

First, you need to create an account and container in Google Tag Manager. The container contains a website. An account can contain several containers.

To be able to use the Google Tag Manager for your website, you must integrate it there. To do this, you will find two code scripts in the workspace in your container which you must integrate into the source code of the website on each page.

The first script should be implemented as high up as possible in your source code within the <head> area and looks like the following illustration. Each container has a unique container ID which is contained in the code.

In the example, the container ID is ‘GTM-XXXX’. This area must be replaced by the corresponding ID.

1
2
3
4
5
6
7
<!-- Google Tag Manager -->
<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=truej.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer',GTM-XXXX');</script>
<!-- End Google Tag Manager -->

The second script should be implemented after the opening <body> tag. Again, it is necessary to replace the “GTM-XXXX” section with the corresponding container ID. The second script should look like this:

1
2
3
4
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->



The use

Now that the Google Tag Manager is installed, you can implement code snippets such as tracking codes or conversion pixels on your website and make configurations.

In Google Tag Manager, you can create specific tags, triggers and variables within the container as required. These ensure that the correct data is recorded, classified and forwarded to the corresponding tag.

A tag replaces the code fragment that would normally be inserted into the source code of the website. It determines which tool data is sent to. For example, you can integrate the Google Analytics code or the Google Ads conversion pixel. There are already predefined tags for this, which can be configured quickly and easily with just a few clicks

Triggers define the conditions under which a tag should be fired or blocked. Such a condition can be, for example, a page view or the click on a button or link. Other examples of a trigger are subscribing to a newsletter or submitting a contact form.

Variables determine where values are queried and where they are stored. This makes it possible, for example, to use a variable to specify that a trigger with a page view only triggers on a specific subpage with a specific URL. Values such as the Google Analytics tracking ID, which is required for different analytic tags, can also be created as a variable.

Tips & Tricks

  • Do not forget to inform your data protection officer that you are using Google Tag Manager so that they can make any necessary changes to your site’s legal notice.
  • Do you work in a team? Clarify who has which authorizations so that errors are reduced and your Tag Manager account is secure.
  • We’ve all been there: you change something and two weeks later you wonder what the change was good for. It is best to document all the functions for which you use the Tag Manager. This will help you to avoid accidentally deactivating important functions in the future and you can keep an overview.

Do you need help with the Google Tag Manager or in other areas of online marketing?
Then contact us now without obligation and arrange a free initial consultation!

More articles about - Uncategorized

Julian Schweizer
It's finally that time again. The SEO contest starts anew and this year MISSION OM is once again on an exploration mission to reach for the stars in SEO heaven. Full of zest for action and fully loaded energy containers, our spaceship will take off on 03.05.2022 in new scouts of the SEO universe.
Julian Schweizer
Keyword analysis is an important building block in search engine optimization. It is one of the first steps and forms the basis for further optimization.
Alexander Kern
For a long time, many teams were unsure whether gross or net amounts should be transferred in Google Analytics 4 (GA4) - and used gross amounts "to be on the safe side". This still leads to incorrect sales in GA4 today. Google has now clearly specified that value and price should be net.
Alexander Kern
Well-functioning conversion tracking is essential for successful Google Ads campaigns. But what should you do if the message "Tag Failed" appears for all Google Ads conversion tags and remarketing tags in Google Tag Manager (GTM)? In this article, you will find out what is behind this error and how you can fix it.

Leave a Reply

Your email address will not be published. Required fields are marked *