PHPackages                             spinbits/google-analytics-4-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. spinbits/google-analytics-4-plugin

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

spinbits/google-analytics-4-plugin
==================================

Spinbits Google Analytics 4 plugin for Sylius.

v1.3.0(1y ago)75.9k↓12.5%8[2 PRs](https://github.com/spinbits/sylius-google-analytics-plugin/pulls)MITPHPPHP ^8.0 || ^8.1

Since Sep 13Pushed 1y ago2 watchersCompare

[ Source](https://github.com/spinbits/sylius-google-analytics-plugin)[ Packagist](https://packagist.org/packages/spinbits/google-analytics-4-plugin)[ RSS](/packages/spinbits-google-analytics-4-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (32)Versions (11)Used By (0)

[![image](./docs/img/spinbits.jpg)](https://spinbits.io)

Google Analytics 4 Enhanced ecommerce Plugin
============================================

[](#google-analytics-4-enhanced-ecommerce-plugin)

Need help ?
-----------

[](#need-help-)

Drop us a message

Overview
--------

[](#overview)

This plugin is used to connect Sylius with [Google Analytics 4](https://developers.google.com/analytics/devguides/collection/ga4) using Google Tag Manager ([gtag.js](https://developers.google.com/tag-platform/gtagjs/reference)). It integrates with all ecommerce GA4 [events](https://developers.google.com/analytics/devguides/collection/ga4/reference/events). Additionaly it measures page load time and post it as event to GA4.

EventDescriptionadd\_to\_cartA user adds one or more products to a shopping cartview\_cartA user loaded shopping cart viewremove\_from\_cartA user removed item from shopping cartbegin\_checkoutA user initiates the checkout process for one or more productsadd\_shipping\_infoA user provided shipping data in checkout processadd\_payment\_infoA user provided payment data in checkout processpurchaseA user completes a purchaseview\_itemA user views details for a productsearchA user searched for a termview\_item\_listA user views a list of one or more productsloginA user logged in to the shopsignupA user signup in to the shoptiming\_completeMeasures page load timeLinks
-----

[](#links)

[https://support.google.com/tagmanager/answer/6103696?hl=pl&amp;ref\_topic=3441530](https://support.google.com/tagmanager/answer/6103696?hl=pl&ref_topic=3441530)

Details
-------

[](#details)

It is designed based on backend Sylius events for high compatibility no matter what template your Sylius store is using.

Quickstart Installation
-----------------------

[](#quickstart-installation)

1. Add configuration to `config/services.yaml` with your Google Tag identificator default for all channels:

    ```
    spinbits_sylius_google_analytics4:
        id: "G-XXXXXXXXXX"
    ```

    For dedicated GTag Id per channel you can pass `channels_ids`. It contains key-value array where key is channel `code` and value is assigned Google Tag identificator.

    ```
    spinbits_sylius_google_analytics4:
        id: "G-XXXXXXXXXX"
        channels_ids:
            FASHION_WEB: "G-DF1P3RRJ8S"
            OTHER_CHANNEL: "G-WX1RJ8SP3R"
    ```
2. Install plugin:

    ```
    composer require spinbits/google-analytics-4-plugin
    ```

### Develop

[](#develop)

1. Execute `make start`
2. See your browser `open localhost`

You can find more examples in tests directory and in this repo: [Google Analytics 4 Enhanced ecommerce Plugin](https://github.com/spinbits/sylius-google-analytics-plugin)

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 96.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 ~123 days

Recently: every ~128 days

Total

6

Last Release

728d ago

Major Versions

0.10 → v1.0.02022-12-23

PHP version history (2 changes)0.9PHP ^8.0

0.10PHP ^8.0 || ^8.1

### Community

Maintainers

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

---

Top Contributors

[![jakublech](https://avatars.githubusercontent.com/u/3625472?v=4)](https://github.com/jakublech "jakublech (136 commits)")[![ehibes](https://avatars.githubusercontent.com/u/487124?v=4)](https://github.com/ehibes "ehibes (2 commits)")[![FarouHub](https://avatars.githubusercontent.com/u/19347122?v=4)](https://github.com/FarouHub "FarouHub (2 commits)")[![marhub](https://avatars.githubusercontent.com/u/2960432?v=4)](https://github.com/marhub "marhub (1 commits)")

---

Tags

analyticsgoogle-analytics-4gtagphpsylius-plugingooglesyliusanalyticssylius-pluginspinbits

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/spinbits-google-analytics-4-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/spinbits-google-analytics-4-plugin/health.svg)](https://phpackages.com/packages/spinbits-google-analytics-4-plugin)
```

###  Alternatives

[setono/sylius-analytics-plugin

Google Analytics plugin for Sylius

23329.6k](/packages/setono-sylius-analytics-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)[monsieurbiz/sylius-rich-editor-plugin

A Rich Editor plugin for Sylius.

75380.8k6](/packages/monsieurbiz-sylius-rich-editor-plugin)[synolia/sylius-scheduler-command-plugin

Scheduler Command Plugin.

34361.5k](/packages/synolia-sylius-scheduler-command-plugin)[odiseoteam/sylius-blog-plugin

This plugin add blog capabilities to your Sylius project

37104.5k](/packages/odiseoteam-sylius-blog-plugin)

PHPackages © 2026

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