codeaware GmbH Logo

Tag Manager - How and Why?

For optimal marketing measures, it is important to know your target audience. This usually involves the use of analytics tools. To manage these tools comfortably, tag managers are often used. How can a simple configuration look like?

Tag Manager - How and Why?
Ing. Philipp Doblhofer Ing. Philipp Doblhofer

Ing. Philipp Doblhofer

Tag managers are used on many websites – especially when the affected website is to be optimized for users or a marketing campaign is being monitored. These managers allow, among other things, the comfortable configuration and management of analytics scripts without having to adjust the website’s code itself. By integrating a tag manager, a marketing department can (in many cases) configure and manage analytics scripts independently of the website programming.

A widely used tag manager is the Google Tag Manager. Typical use cases are illustrated here with short examples.

Setting up Google Tag Manager

The Tag Manager can be set up at An account can be created by selecting ‘Create account’. Multiple independent containers can be managed within an account:

Google Tag Manager - Step 1

After an account has been created, a container for an account can be created via the icon with the 3 dots:

Google Tag Manager - Step 2

Then, 2 code snippets are displayed. These must be inserted into the website’s code. From then on, tags can be freely integrated on the site.

Integrating Google Analytics

Google Tag Manager - Step 3

In the Variables section, a new custom variable must be created for this purpose. This should be a “Google Analytics Settings” type. The tracking ID generated by Google Analytics must be specified here. For GDPR compliance, the “anonymizeIP” option should also be activated:

Google Tag Manager - Step 4

Then, in the “Tags” section, we create a tag for the PageView event, which is triggered for every page visit:

Google Tag Manager - Step 5

“Page View” is set as the tracking type, and we specify our newly created variable as the Google Analytics setting. “All Pages” is set as the trigger.

For correct GDPR-compliant integration, depending on the use case, it may be necessary for these tracking scripts to become active only after an opt-in. Accordingly, the trigger section must be adjusted in this case.

The settings made can be tested with the “Preview” button and then published with the “Submit” button.

Analyzing Link Clicks

For this, a trigger for link clicks is created. This is triggered whenever a link is clicked:

Google Tag Manager - Step 6

Only the corresponding tag for the complete implementation is missing. In Google Analytics, we represent these actions as an event:

Google Tag Manager - Step 7

However, the possible applications are not limited to the examples shown above. For example, scroll depth and other metrics can be recorded. Complex events for conversion paths can also be configured. These are much easier to manage than if they were directly embedded in the code.

But it’s not just Google Analytics that is supported by tag managers. Google Ads, Facebook, or LinkedIn pixels can also be used. There is a variety of marketing tags offered – but if the right one is not among them, simple HTML code for the tracking code can also be integrated. Recently, templates have also been available: these are preconfigured tag settings by other users that allow the comfortable use of further tags – which have not yet been implemented by Google.