Install extension

Install and activate the extension in your Shopware administration under Extensions.

How the plugin works

The plugin supports two different methods for tracking integration in your Shopware shop:

  1. Google Tag Manager (GTM)
    The recommended and most flexible method. With Google Tag Manager, you can manage all tracking events centrally, add your own tags and expand tracking at any time - without having to make any changes to the shop code. The plugin provides you with a preconfigured GTM template for this purpose.
  2. Google tag (gtag.js)
    This method integrates Google Analytics 4 and optionally also Google Ads directly via the gtag.js script - without Tag Manager. It is suitable if you prefer a simple setup.

Important: Deactivate other Google Analytics integrations if you use this app.

Set up Google Tag Manager

Tag Manager account and container

  1. Log in to your Google Tag Manager account or create a new account.
  2. Create a new empty container for importing the default settings.

For advanced users: You can also use an existing container and merge it later. However, we recommend using a new container.

You can find help with Google Tag Manager here:
Google Tag Manager Support

Download and customise template

Download the right GTM template for your use case.

Open the downloaded JSON file with a text editor.

Replace the following placeholders with your individual values using "Search & Replace":

  • ###ACCOUNT_ID####: Your Google Tag Manager account ID (from the URL: /accounts/xxxxxxxxxx/)
  • ###CONTAINER_ID###: Your container ID (from the URL: /containers/xxxxxxxxxx/)
  • ###CONTAINER_NAME###: Name of your GTM container (visible in the GTM header)
  • ###GTM_ID###: Your Google Tag Manager ID (format: GTM-XXXXXXXXXX)

Check again that all placeholders have been replaced correctly.

Import template

Import the customised file in GTM under Management → Import container.

Fill in variables

Switch to the GTM area Variables and fill in the following constants (enter values):

  • 1.0# Google Analytics - Tag ID
  • 2.0# Google Ads - Conversion ID
  • 2.1# Google Ads - Label ID

How to find the IDs:

Analytics: Create a property or go to your existing property in Google Analytics and navigate to Administration (bottom left) and then to "Data streams". Select the relevant data stream. You will find the GA4 ID at the top right (measurement ID). Google Help

Ads: Log in to Google Ads → Target project → Conversions → Summary. Open the desired conversion action (or create a new one) Under Tag setup, select the "Use Google Tag Manager" tab. There you will find the conversion ID and the conversion label.

Configure plugin in Shopware

Now switch to your Shopware backend and open the plugin configuration.

Under "Which tracking integration would you like to use?", select the option "Google Tag Manager".
Then enter your GTM ID (e.g. GTM-XXXXXXX) in the "Google Tag Manager Container ID" field.

If you use google Ads Tracking, please also activate the option and, if applicable, Enhanced Conversion Data:

Save the configuration to activate the integration of the container in the shop.

Check and publish containers

Use the Preview function in Google Tag Manager ("View in preview") to test your container. Enter your shop URL and check whether all events such as product view, add-to-cart or purchase are triggered correctly. Make sure that no tracking takes place if cookie consent is rejected.

If everything works as desired, don't forget to publish the container Click on the top right of the GTM on Send → Publish. Only then will your tracking be active in the live shop.

Configuration Google Analytics (gtag.js)

If you don't want to use Google Tag Manager, you can alternatively work directly with the Google Analytics tracking code (gtag.js).

  1. Choose from "Which tracking integration would you like to use?" the option "Google Analytics (gtag.js)".
  2. Wear your Google Analytics 4 Measurement ID in the format G-XXXXXXXXXXXX in the corresponding field. You can find the ID in Analytics under Administration → Data streams
  3. Save the configuration.

The plugin now handles tracking via the gtag.js code - including all supported e-commerce events such as product view, add-to-cart and checkout.

Hint: If you use the Google Tag Manager you must maintain the GA-ID there in the container - not in the plugin.

Configuration Google Ads Tracking (gtag.js)

If you want to use Google Ads Conversion Tracking without using the Google Tag Manager, you can set this up directly via the gtag.js tracking code.

  1. Choose from "Which tracking integration would you like to use?" the option "Google Analytics (gtag.js)".
  2. Activate the option in the plugin "Activate conversion tracking".
  3. Wear your Google Ads Conversion ID and the associated Conversion label in the corresponding fields.
  4. (Optional) Activate "Activate enhanced conversion data"to transmit additional user data such as email address or telephone number to Google Ads. This improves the allocation of conversions - especially for cross-device purchases.
  5. Save the configuration.

Hint: For Enhanced Conversions, you must also activate this function in your Google Ads account. You can find instructions here: Google Ads guide to extended conversions

How do I find my Google Ads conversion ID and the conversion label?

  1. Log in to your Google Ads account.
  2. Navigate to → Target project → Conversions → Summary
  3. Select an existing Conversion campaign or create a new one.
  4. Click in the area "Tag facility" on the tab "Set up the day yourself".
  5. In the "Event snippet" section, you will find both your conversion ID (e.g. AW-1234567890) and the conversion label (e.g. abc123XYZabcDEF456) under send_to.

Dynamic remarketing

If you want to use dynamic remarketing via Google Ads, you can specify a so-called "feed type key" in the plugin configuration. This is necessary so that Google can correctly allocate your product data and display suitable adverts.

Select the appropriate type depending on what you are applying for. The following options are available:

- retail
- education
- flights
- hotel_rental
- jobs
- local
- real_estate
- travel
- custom

For classic online shops, the following is usually "retail" the right choice.

You can find more information on use and setup in the official Google Ads Remarketing documentation:
https://support.google.com/google-ads/answer/7305793?hl=de&ref_topic=10070037#zippy

Configure consent management

In the plugin configuration, select the consent manager that you use in your shop. Supported plugins include the Shopware Cookie Consent Manager, Cookiebot, Usercentrics, CookieFirst, CCM19.

In the "Expert mode" field, you can - if necessary - enter a customised name or the key of your content tool. This option is particularly useful for external tools that require their own integration.

Expert settings (Consent-Free Tracking)

If you are using a special setup in which the Google Tag Manager is to be loaded independently of the cookie content, you can activate an additional container snippet here.

To do this, activate the option "Activate Consent-Free Google Tag Manager JavaScript snippet" and enter in the field below the corresponding Container ID (e.g. GTM-XXXXXXX).

This function is intended exclusively for advanced use cases - for example, if you use tags that are Do not collect any personal data or must be loaded before consent is given.

Please note: The shop operator is responsible for GDPR-compliant use. Only use this option if you are aware of the legal implications.

Opt-out link for Google Analytics

To deactivate tracking by users, add the following link to your privacy policy:

<a onclick="javascript:gaOptout();" href="javascript:void(0);">Switch off Google Analytics tracking for this website here</a>

FAQs

Create a property or go to your existing property in Google Analytics and navigate to Administration (bottom left) and then to "Data streams". Select the relevant data stream. You will find the GA4 ID at the top right (measurement ID). Google Help

In Google Ads, navigate to → Target project → Conversions → Summary. Open the desired conversion. Under Tag setup you will find the conversion ID and conversion label.

With the Google Tag Assistant you can check and debug the implementation and functionality of your Google tags on the website. You can see whether the tags are correctly integrated and how they are triggered ("fire").

You can also access the Tag Assistant directly from the Google Tag Manager by using the "View in preview" function. This allows you to test in real time which tags are triggered by which action in the shop.

GTM offers you a centralised management interface for all tracking tags. With gtag.js, you only integrate Google Analytics directly, without additional administration or extensibility.

New properties in Google Analytics 4 do not usually display data immediately. First use the "Real-time" reportto check whether activities are recognised.

If no data appears, please check the following:

  • Is your GA4 measurement ID entered correctly?
  • Has consent been given by the visitor (consent to cookies)?
  • Is an adblocker active that could block tracking?

No, the add-on is not necessary, as support for Consent Mode V2 is independent of the Shopware Consent Manager.

With the extension, only one Adwords ID and one Analytics ID can be used at a time. It is not possible to use multiple snippets at the same time, for example for UA and GA4.

The message "A tag read consent before a default was set" means that no default was set for Constent Mode V2. We have deliberately implemented this as we only set Constent Mode V2 after confirmation by the user. This is the correct procedure from a GDPR perspective.