Skip to main content Skip to search Skip to main navigation
Shopware Payments ramp-up pricing for 12 months. Limited time only. Learn more
Diese Seite ist auch auf Deutsch verfügbar.
weedesign

Google Tag Manager

Rating: no rating ( write a review )
Downloads: <10

Description

Highlights

  • Google Tag Manager with 13 GA4 events from view_item_list to purchase
  • Tag Manager loads only after consent (default), also with Cookiebot
  • Google Consent Mode v2 for GA4 via the Tag Manager cookies (optional)
  • GA4 user data (default) and enhanced conversions with a hashed e-mail (optional)
  • Server-side Tag Manager URL (optional) plus JSON export and import

Features

  • GA4 view_item_list and select_item in product listings
  • GA4 view_item on the product page with brand and SEO category
  • GA4 add_to_cart with the added quantity, plus remove_from_cart
  • GA4 view_cart on the cart page with cart value and items
  • GA4 begin_checkout, add_shipping_info and add_payment_info at checkout
  • GA4 purchase with tax and shipping costs, once per order and session
  • GA4 search event with the search term of the results page
  • GA4 login and sign_up events for customer accounts
  • One Tag Manager switch per GA4 event, all 13 on by default
  • Tag Manager loads after consent in Shopware's cookie banner without a reload
  • Tag Manager cookies in the Statistics and Marketing groups of the banner
  • GA4 consent_status event with the consent per category (optional)
  • Twig placeholders in custom Tag Manager dataLayer values
  • page_type, shop name, currency and language in the Tag Manager dataLayer
  • Tag Manager keeps pages with customer data out of the HTTP cache

About the Extension

Tag Manager brings Google Tag Manager into your storefront and fills the dataLayer with 13 GA4 events, from the product listing to the purchase. By default, the container loads only after the visitor's consent, and optional features add Google Consent Mode v2, enhanced conversions and loading from your own server-side container. You set everything per sales channel in the plugin configuration.

Google Tag Manager in your storefront

Switch on "Enable Google Tag Manager" and enter your "GTM Container ID" (GTM-XXXXXXX) in the plugin configuration. Tag Manager then loads the container on the storefront pages of the sales channel, by default after the visitor's consent.

  • settings per sales channel
  • "Server-side GTM URL" loads gtm.js from your own server-side container (optional)
  • Tag Manager loads only the GTM container: tags, triggers and variables stay in your container

13 GA4 events in the dataLayer

Tag Manager pushes the following GA4 events to the dataLayer. Every event has its own switch, all of them are on by default, and "Enable GA4 e-commerce events" is the master switch for the ten e-commerce events.

  • view_item_list and select_item in product listings, for example on category pages and in search results
  • view_item on the product detail page
  • add_to_cart and remove_from_cart when products go into or out of the cart, pushed with the off-canvas cart or the next page view
  • view_cart on the cart page
  • begin_checkout, add_shipping_info and add_payment_info on the checkout page "Complete order", with the selected shipping and payment method
  • purchase on the thank-you page after the order, with order number, value, tax and shipping costs
  • search with the search term on the search results page
  • login and sign_up for customer accounts

GA4 item data without duplicates

Items carry the product number as item_id, the name, the unit price and the currency, plus the quantity (except in product listings) and the manufacturer as item_brand where one is assigned.

  • item_category with the SEO category on the product detail page
  • the position in the list as index and, in search results, the search term as item_list_name
  • add_to_cart counts only the added quantity, also when the product is already in the cart
  • begin_checkout fires once per cart state, the shipping and payment events once per cart state and method, and purchase once per order, also when the page is reloaded in the same session
  • the previous ecommerce object is cleared before the next e-commerce event

Consent check before Tag Manager loads

"Only load GTM after consent" is on by default: the container loads only after the visitor accepts the cookie "Google Tag Manager" in the group "Statistics" of Shopware's cookie banner. With Shopware's banner, Tag Manager loads right after the consent, without a page reload.

  • third-party consent tools: Cookiebot (cookie CookieConsent, category statistics) or a cookie with URL-encoded JSON that holds true or false per category
  • "Consent cookie name" and "Required consent category" set the cookie and the category to check
  • the cookie "Google Tag Manager (Marketing)" in the group "Marketing" for the advertising signals of Consent Mode v2
  • dataLayer entries are written before the consent, and the container processes them once it loads

Google Consent Mode v2 for GA4

"Enable Google Consent Mode v2" (optional) sends consent signals before the container loads. All four consent types start as "denied" and switch to "granted" when the visitor agrees.

  • with Shopware's cookie banner, analytics_storage follows the cookie "Google Tag Manager" and ad_storage, ad_user_data and ad_personalization follow "Google Tag Manager (Marketing)"
  • "Wait for consent update (ms)" with 500 ms by default
  • consent_status event with the consent per category (analytics, marketing, functional) on page views and consent changes (optional)

User data and enhanced conversions for GA4

"Push user data to dataLayer" is on by default and adds the login status and the user type and, for logged-in customers, the customer group and a SHA-256-hashed customer ID as user_id.

  • "Enhanced Conversions (hashed e-mail)" adds the customer's e-mail address as a SHA-256 hash for Google Ads (optional)
  • pages with customer-specific values are excluded from the HTTP cache

Custom dataLayer for Tag Manager

Under "Custom dataLayer variables", you add your own values in the format key = value, one per line. Tag Manager adds them to the base dataLayer of the storefront pages.

  • numbers and true/false become numbers and booleans
  • Twig placeholders such as {{ page.product.name }} are filled per page, and empty results are left out
  • page_type, shop_name, currency_code and page_language are added automatically
  • your own values are part of the configuration export

Tag Manager export, import and documentation

Under Marketing > Tag Manager, the page "Export / Import" downloads the values saved for a sales channel, or the global configuration, as a JSON file and imports it again, for example from staging to production.

  • the import checks the values against the setting types before it saves them
  • the page "Documentation" covers overview, installation, configuration, events, consent, custom dataLayer and FAQ

Details

  • Available: English, German
  • Latest update: 2 November 2026
  • Publication date: 30 September 2026
  • Version: 2.0.0
  • Category: Tracking

Resources

Reviews (0)

Write a review

If you downloaded this extension you can write a review in the Shopware Account.

Write a review

About the Extension Partner

Partner Status

  • Shopware Extension Partner Shopware
    Extension Partner

Details

  • Ø-Rating: 4.9

    Average rating of 4.9 out of 5 stars

  • Partner since: 2019
  • Extensions: 71

Support

  • Based in: Germany
  • Speaks: German, English
  • Response time: Very quickly