Navigation

ThemeWare® Knowledge Base

How do I add the Google tag?

What a Google tag is, how the Google Tag Manager manages tags centrally and how to add it to your Shopware shop.

The quickest way is an extension from the Shopware Store that adds the Google tag or the Google Tag Manager (GTM) to your shop. A Google tag is a single code snippet that is added to a website to collect specific data and send it to Google services.

With the Google Tag Manager, such tags as well as other marketing and analytics tags (e.g. Google Analytics, AdWords) can be managed and implemented centrally and flexibly, without direct changes to the code of the website.

You can use a Google tag on its own or together with the Google Tag Manager. You will find more information directly at Google:

Set up the Google tagsupport.google.com/tagmanager/answer/12002338?hl=en

To add the Google Tag Manager to your Shopware shop as quickly and easily as possible, we recommend a suitable extension from the Shopware Store:

Shopware Storestore.shopware.com/en/extensions

Adding the Google tag manually

We currently have no tutorial for adding the Google tag manually. As user data is collected and processed when using Google tags and the Google Tag Manager, compliant use under the General Data Protection Regulation (GDPR) must be considered. We recommend asking your data protection officer for their assessment beforehand.

From a technical point of view, the block "layout_head_javascript_tracking" in meta.html.twig seems to be a suitable place.

In the theme configuration, the block "Expert settings" (tab "Others") offers the fields "Individual HTML code" for the head area and "Individual JavaScript code" for the end of the page. Please note that Shopware might clean code from text fields in the future.

Last updated on

More from ThemeWare®: About ThemeWare® · Demoshops · Manual · Video tutorial · Utilities

This page online: https://knowledge.themeware.design/knowledge-base/frequent-questions/how-do-i-add-the-google-tag · ThemeWare® Service Portal, service.themeware.design