Everything you'd want to know before you install.
A detailed look at how Google Tag Manager for Shopware — GTM, GA4 e-commerce, Consent Mode v2 & Enhanced Conversions works, why we built it the way we did, and the thinking behind the features above.
Why a plugin dedicated to e-commerce measurement?
In 2026, measuring e-commerce performance on Shopware requires perfect alignment of four disciplines: Google Tag Manager to orchestrate tags, GA4 Enhanced Ecommerce for complete funnel tracking, Consent Mode v2 for GDPR compliance without losing measurement, and Enhanced Conversions to reconnect Google Ads conversions to your back-office. Configuring all this manually takes weeks and exposes to subtle errors (consent loading order, data layer format, incorrect SHA-256 hashing, item_id that does not match the Merchant Center feed). This plugin solves these four points in a single ZIP.
Consent Mode v2: GDPR compliance without sacrificing measurement
Google's Consent Mode v2 lets you keep collecting modelled signals even when the user declines cookies - provided the default consent state is pushed before the GTM container loads. This plugin does it natively: the gtag consent default tag is emitted before the GTM script injection, with the seven Consent Mode v2 categories (ad_storage, ad_user_data, ad_personalization, analytics_storage, functionality_storage, personalization_storage, security_storage). When the visitor accepts or declines via the native Shopware banner, the JavaScript controller automatically emits the corresponding gtag consent update. url_passthrough and ads_data_redaction are toggleable.
GA4 Enhanced Ecommerce: every event, no configuration required
The plugin listens to Shopware's native Page Loaded Events (ProductPageLoadedEvent, NavigationPageLoadedEvent, SearchPageLoadedEvent, CheckoutCartPageLoadedEvent, CheckoutConfirmPageLoadedEvent, CheckoutFinishPageLoadedEvent) and pushes the matching GA4 events at the right time: view_item, view_item_list, search, view_cart, begin_checkout, purchase. On the browser side, a lightweight JavaScript controller captures clicks on the add-to-cart button and line item removal for add_to_cart and remove_from_cart, as well as login and register form submissions for login and sign_up events. Each event is individually toggleable in configuration.
Enhanced Conversions: recover 10 to 30 percent of lost conversions
On the checkout confirm and finish pages, the plugin pushes a user_data object into the dataLayer containing email, phone, first name, last name, street, city and postal code - all hashed SHA-256 server-side per Google specification. Phone is normalized to E.164 (country prefix from the billing ISO), email is trimmed and lowercased before hashing, and US postal code is truncated to the first five digits. Google Ads can then reconnect these conversions to users signed in with their Google account, which typically restores 10 to 30 percent of conversions previously lost in attribution.
Google Shopping and Merchant Center compatible data layer
For GA4 and Google Ads to correctly match your products with your Merchant Center feed, every item in the dataLayer must use the same item_id as your feed. This plugin offers three configurable sources: Shopware product number (recommended, equivalent to SKU), Shopware internal UUID, or EAN/GTIN. Every item also includes item_brand from the manufacturer, item_category1 to item_category5 from the deepest breadcrumb, mpn and gtin when set, discount computed from the list price, and google_product_category either globally by default or per-product via the df_google_product_category custom field.
Server-side GTM: protect your data and boost deliverability
Server-side tagging routes GTM traffic through a domain you control (typically gtm.yourdomain.com), which bypasses browser-side blockers, protects user data and improves resilience against cookie policy changes. This plugin supports server-side GTM natively: simply enter the URL of your custom loader in the configuration. The GTM script and the noscript iframe will automatically point to your Tag Manager server instead of www.googletagmanager.com.
Architecture and performance
The plugin follows Shopware 6.7's modern Symfony architecture: Symfony Subscriber for page events, services in services.xml with dependency injection, system_config XML for admin configuration, JSON snippets for translations, and decoration of the Shopware CookieProvider to integrate GTM with the native banner. No webpack or TypeScript build step: the JavaScript controller is vanilla JS served as a static asset. The footprint is minimal (less than 10 KB gzipped) and consent loading order is guaranteed by direct injection in the meta head tag.
There are no reviews yet.