PHPackages                             webmatch/wbm-tag-manager - 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/wbm-tag-manager

ActiveShopware-plugin[Utility &amp; Helpers](/categories/utility)

webmatch/wbm-tag-manager
========================

GTM integration and dataLayer configuration for Shopware

3.5.6(4y ago)2516.0k17[4 issues](https://github.com/webmatch/WbmTagManager/issues)[1 PRs](https://github.com/webmatch/WbmTagManager/pulls)GPL-3.0-or-laterPHP

Since May 23Pushed 2y ago8 watchersCompare

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

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

WbmTagManager - GTM integration and dataLayer configuration
===========================================================

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

[![Scrutinizer](https://camo.githubusercontent.com/a7d6cebc312a100ede9cdd4226b042390cea156dc851cf11607b501e038ab2ff/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7765626d617463682f57626d5461674d616e616765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/webmatch/WbmTagManager/?branch=master)[![Travis CI](https://camo.githubusercontent.com/098b1f24cf0905d45d8162152708ea2a0768dd291f286c4a16d55ff864b39271/68747470733a2f2f7472617669732d63692e6f72672f7765626d617463682f57626d5461674d616e616765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/webmatch/WbmTagManager)

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.

[![WbmTagManager](https://camo.githubusercontent.com/83bf4a1911387630b91e420ff20636de367aebe97a57d2bac9defa4fe91b926e/68747470733a2f2f7777772e7765626d617463682e64652f77702d636f6e74656e742f75706c6f6164732f323031372f30322f7461675f6d616e616765725f73637265656e2e706e67)](https://camo.githubusercontent.com/83bf4a1911387630b91e420ff20636de367aebe97a57d2bac9defa4fe91b926e/68747470733a2f2f7777772e7765626d617463682e64652f77702d636f6e74656e742f75706c6f6164732f323031372f30322f7461675f6d616e616765725f73637265656e2e706e67)

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 combination of Module/Controller/Action
- All variables passed to the view are available as values for the dataLayer properties
- Use smarty syntax to insert variables and alter values

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

[](#requirements)

- Shopware &gt;= 5.6.3

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

[](#installation)

Clone this repository into a folder **WbmTagManager** within the **custom/plugins** directory of the Shopware installation.

- Install the plugin through the Plugin-Manager within the Shopware backend.
- Enter the container ID of the desired GTM Container (found in the GTM backend)
- Activate the plugin and when prompted allow for the clearing of the listed caches.
- Reload the backend to complete the installation.

Install with composer
---------------------

[](#install-with-composer)

- Change to your root Installation of shopware
- Run command `composer require webmatch/wbm-tag-manager` and install and activate plugin with Plugin Manager

Usage
=====

[](#usage)

The module will be accessible in backend through a new menu point under the Settings menu tab.

The plugin comes pre-configured for:

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

Use syntax like "$sArticles as $sArticle" 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.

Since version 3.0.0 there's a new UI for adding new modules, as well as updating and deleting existing modules.

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

The key must contain the values for module, controller and action, connected by underscores. See the [Shopware documentation](https://developers.shopware.com/developers-guide/controller/#controller-and-urls)for a more detailed explanation. The key must also be all lowercase.

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

Additional Smarty functions
===========================

[](#additional-smarty-functions)

{dbquery}
---------

[](#dbquery)

Since version 3.0.0 a new Smarty function `{dbquery}` 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 price of the newly added product.

```
{dbquery select='price' from='s_order_basket' where=['ordernumber =' => $smarty.request.sAdd, 'sessionID =' => $smarty.session.Shopware.sessionId] order=['id' => 'DESC']}

```

Please note the use of single quotes only and the array arguments.

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.

{request\_get}
--------------

[](#request_get)

Request parameters won't be available utilizing `$smarty.request` if they have been set during dispatch or through sluggified URLs (e.g. `/detail/index/sArticle/123`). By using `request_get` and the `param` argument you can get any parameter available at the time of the dataLayer compiling.

```
{request_get param='sDelete'}

```

{\*|to\_string}
---------------

[](#to_string)

The modifier `to_string` will force casting of a value to string. The default behaviour is to try and determine the type of a value by json decoding. If a numeric value should still be recognized as a string, use the modifier after the variable or value. If you're chaining multiple modifiers, make sure to always use `to_string` in last place.

```
{123|to_string}
=>
"123"

```

Tracking URL Parameters
=======================

[](#tracking-url-parameters)

To track URL parameters (e.g. for campaigns) throughout the user journey, you can set up parameters that will be temporary saved in the session for use in the dataLayer configuration. Within the plugin configuration you can define a comma separated list of GET parameters (e.g. `utm_campaign`, `gclid`, etc). Those parameters can then be used in the dataLayer configuration by reading the session: `{$smarty.session.Shopware.wbmTagManager.nameOfTheParameter}`

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~60 days

Recently: every ~132 days

Total

31

Last Release

1506d ago

Major Versions

2.1.9 → 3.0.02018-07-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/69c1745bd6023c706f651e9bdb38515fc7678caf52b9580126141381168669cd?d=identicon)[dneustadt](/maintainers/dneustadt)

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

---

Top Contributors

[![dneustadt](https://avatars.githubusercontent.com/u/9033214?v=4)](https://github.com/dneustadt "dneustadt (59 commits)")[![wbm-mkopp](https://avatars.githubusercontent.com/u/63654087?v=4)](https://github.com/wbm-mkopp "wbm-mkopp (32 commits)")[![cjost1988](https://avatars.githubusercontent.com/u/19785568?v=4)](https://github.com/cjost1988 "cjost1988 (14 commits)")[![wbm-sbasler](https://avatars.githubusercontent.com/u/56914435?v=4)](https://github.com/wbm-sbasler "wbm-sbasler (8 commits)")[![Gugiman](https://avatars.githubusercontent.com/u/5836639?v=4)](https://github.com/Gugiman "Gugiman (3 commits)")[![uehler](https://avatars.githubusercontent.com/u/6990761?v=4)](https://github.com/uehler "uehler (1 commits)")[![JanBrockmann](https://avatars.githubusercontent.com/u/10598163?v=4)](https://github.com/JanBrockmann "JanBrockmann (1 commits)")[![hlohaus](https://avatars.githubusercontent.com/u/983577?v=4)](https://github.com/hlohaus "hlohaus (1 commits)")[![akkushopJK](https://avatars.githubusercontent.com/u/38048145?v=4)](https://github.com/akkushopJK "akkushopJK (1 commits)")[![mfusswm](https://avatars.githubusercontent.com/u/37333460?v=4)](https://github.com/mfusswm "mfusswm (1 commits)")[![nicoanders](https://avatars.githubusercontent.com/u/17621904?v=4)](https://github.com/nicoanders "nicoanders (1 commits)")

---

Tags

datalayerdatalayer-configurationgoogle-tag-managershopwareshopware-pluginshopwareGoogle Tag Managerdatalayershopware-plugindatalayer-configuration

### Embed Badge

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

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

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[mautic/core

Mautic Open Source Distribution

9.8k2.6k9](/packages/mautic-core)[mediawiki/maps

Adds various mapping features to MediaWiki

78149.7k3](/packages/mediawiki-maps)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

19246.3k2](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19222.5k2](/packages/altis-core)[humanmade/popup

An popup and tooltip dialog block utility, multiple trigger options, and supports anchor placements

146.6k](/packages/humanmade-popup)

PHPackages © 2026

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