PHPackages                             webmatch/tag-manager-sw6 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webmatch/tag-manager-sw6

Abandoned → [https://store.shopware.com/detail/index/sArticle/7813615/number/wbm8772526137131](/?search=https%3A%2F%2Fstore.shopware.com%2Fdetail%2Findex%2FsArticle%2F7813615%2Fnumber%2Fwbm8772526137131)Shopware-platform-plugin[Utility &amp; Helpers](/categories/utility)

webmatch/tag-manager-sw6
========================

Google Tag Manager + Enhanced E-Commerce Tracking

2.2.6(2y ago)1229.4k11[13 issues](https://github.com/webmatch/WbmTagManagerEcomm/issues)proprietaryPHP

Since Jul 15Pushed 1y ago6 watchersCompare

[ Source](https://github.com/webmatch/WbmTagManagerEcomm)[ Packagist](https://packagist.org/packages/webmatch/tag-manager-sw6)[ RSS](/packages/webmatch-tag-manager-sw6/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (1)Versions (34)Used By (0)

WbmTagManagerEcomm - GTM integration and dataLayer configuration
================================================================

[](#wbmtagmanagerecomm---gtm-integration-and-datalayer-configuration)

---

This Plugin will no longer be maintained.
Please use the new Plugin [WbmTagManager](https://store.shopware.com/de/wbm8772526137131m/google-tag-manager-ga4-server-side-tracking.html)
It has full support to GA4 and also a version for Shopware 6.5

---

---

This plugin integrates a new module within the [Shopware](https://www.shopware.de) backend that allows for the integration of the Google Tag Manager Snippet and the configuration of the dataLayer content.

The plugin offers the following features:

- Prepend the GTM Snippet to the head Tag of every page
- Define the content of the dataLayer for any route
- All variables passed to the view are available as values for the dataLayer properties
- Use Twig syntax to insert variables and alter values

Requirements
------------

[](#requirements)

- Shopware &gt;= 6.0

Installation
============

[](#installation)

Download it from the shopware store and install it manually within the shopware backend.

Alternative Installation via composer

```
composer require webmatch/tag-manager-sw6

```

After installation, use the following commands to install and activate the plugin in shopware

```
bin/console plugin:refresh
bin/console plugin:install --activate WbmTagManagerEcomm

```

or the following to update, if previously installed

```
bin/console plugin:refresh
bin/console plugin:update WbmTagManagerEcomm

```

##### ❗ Attention ❗

[](#exclamation-attention-exclamation)

With version 1.0.0 composer package was renamed from `wbm/tag-manager` to `webmatch/tag-manager-sw6` in order to publish the package on packagist. If you used a version &lt;= 0.2.5, and you want to update this plugin, your composer.json should be updated too.

Usage
=====

[](#usage)

The module will be accessible in backend through a new menu point.

The plugin comes pre-configured for:

- Enhanced Ecommerce Tracking of Google Analytics
- Dynamic Remarketing of Google AdWords

Use syntax like `item in lineItems` as value for properties that are supposed to contain iterative elements.

Adding modules
==============

[](#adding-modules)

Modules are essentially configurations of a dataLayer for a specific view, meaning sites of more or less the same type.

When adding new modules you're prompted to enter a name (what the new tab will read) and a route for the module.

The route must be equal to the one of the controller action that is supposed to be tracked.

After adding a module you will find a new tab in the main screen, where you can declare the properties for the dataLayer of that specific route.

Additional Twig functions/filters
=================================

[](#additional-twig-functionsfilters)

dbquery
-------

[](#dbquery)

The Twig function `{{ dbquery(select, from, where, order) }}` is available for the compiling of dataLayers. The function allows you to fetch a single value from any database table. You can pass one or multiple criterias to be used in `WHERE` and `ORDER BY` statements.

The following example will work in the dataLayer of the "Add to basket" module and will fetch the product number of the newly added product.

```
{{ dbquery('product_number', 'product', {'id =': item.id|uuid2bytes}) }}

```

Please note the use of single quotes only and the arguments in form of twig hashes e.g. `{'id =': item.id|uuid2bytes}`.

Also be aware that this feature is reliant on proper syntax, meaning you have to pass an operator with the column name and the columns as well as the values have to exist. Syntax errors will be caught and will result in an empty string to be returned instead.

uuid2bytes
----------

[](#uuid2bytes)

The Twig filter `|uuid2bytes` will convert uuid strings to binary format for the use in `dbquery` functions and the like.

```
{{ item.id|uuid2bytes }}

```

languageid
----------

[](#languageid)

Function that returns the current language id in binary format. For use in `dbquery` functions when fetching translations and the like.

```
{{ languageid }}

```

currencyiso
-----------

[](#currencyiso)

Function that returns the 3 letter ISO code of the storefronts currency.

```
{{ currencyiso }}

```

cartaddprice
------------

[](#cartaddprice)

Function that sets a flag in the session in order to catch the price in from AfterLineItemAddedEvent, which will be injected into the dataLayer right before passing it to the frontend. Primarily for use in `addToBasket` events.

```
{{ cartaddprice() }}

```

cartremoveprice
---------------

[](#cartremoveprice)

Function that returns the unit price of a product when removed from the basket in its current state.
Expects parameter for product id in non-binary format.
Optionally takes a second boolean paramater and, when true, will return the quantity of the product before removal. Primarily for use in `removeFrombasket` events using URL queries as parameters.

```
{{ cartremoveprice(product_id) }}
{{ cartremoveprice(product_id, true) }}

```

getvariantdescription
---------------------

[](#getvariantdescription)

Function that returns a concatenated string of properties for a product variant. Returns empty string if the product is not a variant. Takes either a product id in non-binary format or an existing array of options.

```
{{ getvariantdescription(item.id) }}
{{ getvariantdescription(lineItem.payload.options) }}

```

getparam
--------

[](#getparam)

Function that returns a specific GET/POST/route parameter if available.

```
{{ getparam('id') }}

```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~45 days

Recently: every ~182 days

Total

31

Last Release

806d ago

Major Versions

1.6.0 → 2.0.12021-09-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/daa48953cb1d431a19f5d2fd52474d67d8723822c5054ef407a99cfea09f94f4?d=identicon)[webmatch](/maintainers/webmatch)

---

Top Contributors

[![wbm-sbasler](https://avatars.githubusercontent.com/u/56914435?v=4)](https://github.com/wbm-sbasler "wbm-sbasler (204 commits)")[![lx-wnk](https://avatars.githubusercontent.com/u/20777072?v=4)](https://github.com/lx-wnk "lx-wnk (3 commits)")[![alpox](https://avatars.githubusercontent.com/u/12485194?v=4)](https://github.com/alpox "alpox (1 commits)")[![M-arcus](https://avatars.githubusercontent.com/u/25648755?v=4)](https://github.com/M-arcus "M-arcus (1 commits)")

---

Tags

data-layerdatalayer-configurationgoogle-tag-managergtmshopware-pluginshopware6Google Tag Managergtmshopware6datalayershopware-plugindatalayer-configurationshopware-6

### Embed Badge

![Health badge](/badges/webmatch-tag-manager-sw6/health.svg)

```
[![Health](https://phpackages.com/badges/webmatch-tag-manager-sw6/health.svg)](https://phpackages.com/packages/webmatch-tag-manager-sw6)
```

###  Alternatives

[magepal/magento2-googletagmanager

Google Tag Manager (GTM) for Magento 2 with Advance Data Layer

2691.6M5](/packages/magepal-magento2-googletagmanager)[frosh/tools

Provides some basic things for managing the Shopware Installation

87820.7k3](/packages/frosh-tools)[webmatch/wbm-tag-manager

GTM integration and dataLayer configuration for Shopware

2516.0k](/packages/webmatch-wbm-tag-manager)[cyber-duck/silverstripe-google-tag-manager

Add Tag Manager data layer, events, and ecommerce support for SilverStripe

1628.1k](/packages/cyber-duck-silverstripe-google-tag-manager)[dmitrykazak/magento-google-tag-manager

Google Tag Manager (GTM) Extension for Magento 2

112.8k](/packages/dmitrykazak-magento-google-tag-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
