PHPackages                             stefandoorn/google-tag-manager-plugin - 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. stefandoorn/google-tag-manager-plugin

ActiveSylius-plugin

stefandoorn/google-tag-manager-plugin
=====================================

Google Tag Manager plugin for Sylius.

v1.2.3(2y ago)23273.1k—6.4%14[1 PRs](https://github.com/stefandoorn/google-tag-manager-plugin/pulls)2MITPHPCI passing

Since Aug 25Pushed 1y ago2 watchersCompare

[ Source](https://github.com/stefandoorn/google-tag-manager-plugin)[ Packagist](https://packagist.org/packages/stefandoorn/google-tag-manager-plugin)[ RSS](/packages/stefandoorn-google-tag-manager-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (31)Versions (25)Used By (2)

Google Tag Manager plugin for Sylius eCommerce Platform
=======================================================

[](#google-tag-manager-plugin-for-sylius-ecommerce-platform)

[![License](https://camo.githubusercontent.com/ce421a18d743ee30c76d9ea097f2cc02cb91dfed2fc4f2acb27a1610f75a7de1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73746566616e646f6f726e2f676f6f676c652d7461672d6d616e616765722d706c7567696e2e737667)](https://packagist.org/packages/stefandoorn/google-tag-manager-plugin)[![Version](https://camo.githubusercontent.com/ba271e714d456eea084be703f3fe06a81c179108d4c4e5dc86346811c9efc5bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746566616e646f6f726e2f676f6f676c652d7461672d6d616e616765722d706c7567696e2e737667)](https://packagist.org/packages/stefandoorn/google-tag-manager-plugin)[![Build](https://github.com/stefandoorn/google-tag-manager-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/stefandoorn/google-tag-manager-plugin/actions/workflows/build.yml)

Related plugins
---------------

[](#related-plugins)

- [Enhanced Ecommerce plugin](https://github.com/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin): allows you a smooth integration with Google Analytics Enhanced Ecommerce.

Installation
------------

[](#installation)

### 1. Composer

[](#1-composer)

```
composer require stefandoorn/google-tag-manager-plugin
```

### 2. Load bundle

[](#2-load-bundle)

Add to the bundle list (`config/bundles.php`):

```
    GtmPlugin\GtmPlugin::class => ['all' => true],
```

### 3. Follow installation instructions of required sub bundle ()

[](#3-follow-installation-instructions-of-required-sub-bundle-httpsgithubcomxynnngoogletagmanagerbundle)

Add to your configuration:

```
google_tag_manager:
    enabled: true
    id: "GTM-XXXXXX"
    autoAppend: false
```

And also configure the features you would like to use from this plugin:

```
gtm:
    inject: true
    features:
        environment: true
        route: true
        context: true
        events: true
```

In case you set `autoAppend` to false &amp; also disable the `inject` setting inside this plugin, you have to manage loading of the GTM container yourself.

In case you set `autoAppend` to false &amp; set `inject` to true, be aware of the following:

Required output to your HTML (head, body &amp; footer) are done through Sylius Twig Hooks. The following Sylius Twig Hooks are used:

- `sylius_shop.base.head`
- `sylius_shop.base.header`
- `sylius_shop.base.offcanvas`
- `sylius_shop.base#javascripts`

You can dump the default configuration using:

```
bin/console config:dump-reference GtmPlugin
```

### 5. Install assets (optional: only if you want to use events feature)

[](#5-install-assets-optional-only-if-you-want-to-use-events-feature)

```
bin/console assets:install
bin/console sylius:install:assets
bin/console sylius:theme:assets:install
```

Features
--------

[](#features)

- `environment`: Send Symfony/Sylius environment to GTM
- `route`: Send Symfony/Sylius route to GTM
- `context`: Send Sylius context information to GTM (currency, locale, channel)
- `events`: See below - allows you to register events easily from inside HTML using JS.

Usage
-----

[](#usage)

### Register events from JS

[](#register-events-from-js)

```
var event = new GaEvent('category');
event.register(action, label, value);
```

Make sure also to listen for this specific event inside your GTM configuration.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 83.5% 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 ~212 days

Recently: every ~201 days

Total

14

Last Release

424d ago

Major Versions

v0.5.0 → v1.0.02021-12-20

v1.2.3 → v2.0.0-alpha.12025-03-12

PHP version history (2 changes)0.1PHP ^7.1

v1.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![stefandoorn](https://avatars.githubusercontent.com/u/4903082?v=4)](https://github.com/stefandoorn "stefandoorn (101 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![tuxes3](https://avatars.githubusercontent.com/u/5341293?v=4)](https://github.com/tuxes3 "tuxes3 (3 commits)")[![Prometee](https://avatars.githubusercontent.com/u/861820?v=4)](https://github.com/Prometee "Prometee (2 commits)")[![dsbe-ak](https://avatars.githubusercontent.com/u/72384646?v=4)](https://github.com/dsbe-ak "dsbe-ak (2 commits)")[![kgonella](https://avatars.githubusercontent.com/u/13383428?v=4)](https://github.com/kgonella "kgonella (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![pamil](https://avatars.githubusercontent.com/u/1897953?v=4)](https://github.com/pamil "pamil (1 commits)")[![lruozzi9](https://avatars.githubusercontent.com/u/26346480?v=4)](https://github.com/lruozzi9 "lruozzi9 (1 commits)")[![markbeazley](https://avatars.githubusercontent.com/u/17005579?v=4)](https://github.com/markbeazley "markbeazley (1 commits)")

---

Tags

syliussylius-plugin

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/stefandoorn-google-tag-manager-plugin/health.svg)

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

###  Alternatives

[bitbag/cms-plugin

CMS plugin for Sylius applications.

2461.1M5](/packages/bitbag-cms-plugin)[sylius/invoicing-plugin

Invoicing plugin for Sylius.

901.0M2](/packages/sylius-invoicing-plugin)[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

691.7M14](/packages/sylius-refund-plugin)[stefandoorn/sitemap-plugin

Sitemap Plugin for Sylius

851.0M](/packages/stefandoorn-sitemap-plugin)[sylius/paypal-plugin

PayPal plugin for Sylius.

451.4M4](/packages/sylius-paypal-plugin)[monsieurbiz/sylius-rich-editor-plugin

A Rich Editor plugin for Sylius.

75380.8k6](/packages/monsieurbiz-sylius-rich-editor-plugin)

PHPackages © 2026

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