PHPackages                             bitbag/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. bitbag/google-analytics-4-plugin

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

bitbag/google-analytics-4-plugin
================================

Spinbits Google Analytics 4 plugin for Sylius maintained by BitBag.

v1.0.0(1y ago)0357MITPHPPHP ^8.0 || ^8.1 || ^8.2

Since Feb 7Pushed 1y agoCompare

[ Source](https://github.com/BitBagCommerce/sylius-google-analytics-plugin)[ Packagist](https://packagist.org/packages/bitbag/google-analytics-4-plugin)[ RSS](/packages/bitbag-google-analytics-4-plugin/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (32)Versions (3)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

31

—

LowBetter than 66% of packages

Maintenance40

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.8% 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

Unknown

Total

1

Last Release

512d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15603601?v=4)[bitbag](/maintainers/bitbag)[@bitbag](https://github.com/bitbag)

---

Top Contributors

[![jakublech](https://avatars.githubusercontent.com/u/3625472?v=4)](https://github.com/jakublech "jakublech (136 commits)")[![DominikWolos](https://avatars.githubusercontent.com/u/91727664?v=4)](https://github.com/DominikWolos "DominikWolos (3 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)")[![senghe](https://avatars.githubusercontent.com/u/2512726?v=4)](https://github.com/senghe "senghe (1 commits)")

---

Tags

googlesyliusanalyticssylius-pluginspinbits

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[setono/sylius-analytics-plugin

Google Analytics plugin for Sylius

23329.9k](/packages/setono-sylius-analytics-plugin)[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

701.8M20](/packages/sylius-refund-plugin)[stefandoorn/sitemap-plugin

Sitemap Plugin for Sylius

841.1M1](/packages/stefandoorn-sitemap-plugin)[odiseoteam/sylius-vendor-plugin

Vendor plugin for Sylius. Add Vendor (Brand) to your products

6068.4k1](/packages/odiseoteam-sylius-vendor-plugin)[webgriffe/sylius-table-rate-shipping-plugin

Provides table rate shipping calculator.

1493.8k](/packages/webgriffe-sylius-table-rate-shipping-plugin)[monsieurbiz/sylius-menu-plugin

This plugins allows you to manage menus.

1580.0k1](/packages/monsieurbiz-sylius-menu-plugin)

PHPackages © 2026

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