Startseite » Webanalytics » Google Tag Manager » Google Tag Manager Analytics

How do I install Google Analytics with Google Tag Manager?

In my general guide to Google Tag Manager, you’ve already learned the basics.

Now I’ll show you how to integrate Google Analytics over it on your website relatively easily.

Choosing the right tag

We have already learned that Google Tag Manager works with so-called tags. Now, to install Google Analytics, we need to select the correct tag.

There are now several tags to choose from:

  • Google Analytics: Universal Analytics
    • This tag is used to install the “old” universal Analytics.
  • Google Analytics: GA4 Configuration
  • Google Analytics: GA4 event.
    • This tag is for event tracking in GA4.

Now, to install Google Analytics with the GTM, we select either the Universal or GA4 configuration tag.

gtm-ga-tags

Now how do I configure this tag?

After you have chosen one of the two tags, you need to fill in the given fields.

gtm-ga-tags-konfiguration

I chose to use the Universal Analytics tag in this guide.

To learn how to install GA4, you can use this GA4 Guide.

Now the following steps have to be done:

Selection of the tracking type

    • Here you can choose between page view, event, transaction, etc. We are now concerned here exclusively with the page call type.

What is the page view tracking type?

By selecting this type, you are telling Google Tag Manager that you want to track all page views. That is, all visitors that match the selected trigger of the tag.

 

gtm-ga-tags-variablen

 

Definition of the Google Analytics Property

After we have defined the type, we of course have to tell the tag where we want to send the data. So our ID of the desired Analytics Property.

You can find this ID directly in the Google Analytics interface under Settings / Property Settings.

We now have the option to create a so-called Google Analytics Settings Variable or to enter the tracking ID directly.

What is this Google Analytics variable?

Using variables in Google Analytics settings makes it convenient to use and maintain settings in multiple tags. To set separate settings for this tag, tick the box below to override the default settings. If you do not select a variable in the Google Analytics settings, you will need to set the tracking ID via the Override settings.

If we don’t want to use Analytics variable, we can tick the following checkbox and enter the ID there manually.

gtm-ga-tags-variable

Trigger selection

As a last step, we need to select the correct trigger.

If you want to fire Google Analytics on all pages (is the most common approach if you don’t have Analytics installed yet), then you just need to select the trigger (All Pages). 

This trigger is created by default and is available immediately.

Now all you have to do is save the tag and publish the GTM.

Congratulations, you have installed Google Analytics via Google Tag Manager.

Attention! If you act DSGVO compliant, you should definitely have a Consent Management in place, which of course fires the tag only after the user’s consent.

Helpful Google Tag Manager & Web Analytics Topics