Google Tag Manager

Inhaltsverzeichnis

Introduction

The Google Tag Manager (GTM) simplifies the administration of all tags. The following instructions show you how to get started with the Tag Manager and focus on the essential tags and variables.

Module configuration

Open the Analytics module mask in the administration under Modules – Analytics.

Figure 1: General configuration of the Google Analytics module

Please activate the module by ticking the checkbox, select ‘Use Google Tag Manager integration’ and then copy your GTM container ID into the field provided.

We also recommend that you activate the advanced e-commerce reports. These show detailed purchasing behaviour, product and sales performance. You can find out more in the E-commerce Tracking chapter.

You can now save the settings.

Setting up Google Tag Manager with Google Analytics 4

To use Google Tag Manager with Google Analytics, you need to follow these steps:

Create variables

GA Tracking ID

In the menu on the left side of the Google Tag Manager homepage, click on ‘Variables’ and create a new variable under ‘Custom Variables’ – ‘New’. Give your variable a name, for example ‘ga4_measurement_id’. Now you can configure a new variable with data type ‘Constant’:

Name der Variable Wert Variablentyp
«ga4_measurement_id» «G-XXXXXXXXXX» Konstant

The variable then looks like this:

Figure 2: Variable ga4_measurement_id

Page location

Now we create another variable for the page location:

Name der Variable Variablentyp Name der Datenschichtvariablen
«DLV - page_location» Datenschichtvariable «page_location»

It should now look like this:

Figure 3: Variable ga4_measurement_id

Configuring a tag

Now the created variables have to be included in the tag. On your Google Tag Manager homepage, select the ‘Tags’ option in the sidebar on the left. Click on ‘New’ - ‘Tag Configuration’:

Feldname Wert
Tag-Typ Google Analytics > Google-Tag
Name GA4 - Config + page_view
Tag-ID {{ga4_measurement_id}}
Konfigurationsparameter > page_location {{DLV - page_location}}
Konfigurationsparameter > send_page_view true

Finally, add a trigger to activate the tag. Select All Pages (page view) as the trigger. The tag can now be saved.

The tag then looks like this:

Figure 4: Tag GA4-pageview

E-commerce tracking

Google Analytics can use e-commerce tracking to determine information about product sales, the average order value, the number of transactions or the number of products sold.

Creating a variable

In the menu on the left side of the Google Tag Manager homepage, click on ‘Variables’ and create a new variable under ‘Custom Variables’ - ‘New’. Name your variable ‘DLV - ecommerce.checkout.actionField.step’. Select the data type ‘Data layer variable’:

Name der Variable Name der Datenschichtvariablen Variablentyp
«DLV - ecommerce.checkout.actionField.step» «ecommerce.checkout.actionField.step» Datenschichtvariable

The variable then looks like this:

Figure 5: Variable Step

Creating triggers

On your Google Tag Manager homepage, select ‘Triggers’ in the sidebar on the left. Create the following triggers by clicking on ‘New’ and then ‘Trigger Configuration’: ‘Custom Event’. Enter the event name and the name of the trigger.

Trigger Name Triggertyp Ereignisname
CE - view_item_list Benutzerdefiniertes Ereignis view_item_list
CE - pps_removeFromCart Benutzerdefiniertes Ereignis pps_removeFromCart
CE - pps_purchase Benutzerdefiniertes Ereignis pps_purchase
CE - pps_product Benutzerdefiniertes Ereignis pps_product
CE - pps_category Benutzerdefiniertes Ereignis pps_category
CE - pps_addToCart Benutzerdefiniertes Ereignis pps_addToCart
CE - pps_checkout - begin_checkout Benutzerdefiniertes Ereignis pps_checkout

Figure 6: Trigger ATC

Trigger Begin Checkout

For ‘Trigger CE - pps_checkout - begin_checkout’, an additional setting is required. For ‘Trigger this:’, select ‘Some custom events’. Then ‘DLV - ecommerce.checkout.actionField.step’ ‘is equal to’ ‘2’

Figure 7: Trigger Begin Checkout

Create tags

Create the following tags:

For all tags, the tag type is ‘Google Analytics: GA4 event’, the measurement ID is ‘{{ga4_measurement_id}}’, and under ‘Additional settings’ > ‘E-commerce’, tick ‘Send e-commerce data’ with data source ‘Data Layer’.

Tag Name Ereignisname Trigger
GA4 - PS - add_to_cart add_to_cart CE - pps_addToCart
GA4 - PS - begin_checkout begin_checkout CE - pps_checkout - begin_checkout
GA4 - PS - purchase purchase CE - pps_purchase
GA4 - PS - remove_from_cart remove_from_cart CE - pps_removeFromCart
GA4 - PS - view_item view_item CE - pps_product
GA4 - PS - view_item_list view_item_list CE - pps_category

A typical day then looks like this:

Figure 8: Day purchase

Publishing the version

You can now test the integrations by clicking on ‘Preview’. If you can see your test purchase in Google Analytics under ‘Real Time’, you can send all the changes you have made in these instructions. To do this, click on ‘Send’ in the top right of the Tag Manager, enter a version name (e.g. V1.0) and ‘Publish’ the configurations you have just created.

Figure 11: GTM Tag Manager

Further help

Do you need further assistance? PepperShop offers you a range of options.

  • Often, clicking on the question mark icon in the top right-hand corner of the administration screen helps. This will take you directly to help on the topic in question.
  • You will find various answers in the FAQ. These can also be accessed in the shop administration via Help & News -> Help Archive. Or via our homepage https://www.peppershop.com/de/services/support/faq/
  • In the PepperShop Academy https://www.peppershop.com/de/services/academy/ you can easily and conveniently find various free video tutorials.
  • We are also happy to help you by email or phone (CHF 195./h) support@glarotech.ch or +41 71 923 08 58
🌶️
🔥
🌶️