PHPackages                             softspring/cms-analytics-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. softspring/cms-analytics-plugin

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

softspring/cms-analytics-plugin
===============================

Analytics integration plugin for Armonic CMS.

6.0.x-dev(1mo ago)024↓50%AGPL-3.0-or-laterPHPPHP &gt;=8.4CI passing

Since Jun 25Pushed 1mo agoCompare

[ Source](https://github.com/softspring/cms-analytics-plugin)[ Packagist](https://packagist.org/packages/softspring/cms-analytics-plugin)[ RSS](/packages/softspring-cms-analytics-plugin/feed)WikiDiscussions 6.0 Synced 2w ago

READMEChangelogDependencies (16)Versions (1)Used By (0)

CMS Analytics Plugin (Experimental)
===================================

[](#cms-analytics-plugin-experimental)

[![Latest Stable](https://camo.githubusercontent.com/99084bcf7c17d27a9f4a0af8165f546c2c146934c29e83b40873d4acd9c2c42c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f6674737072696e672f636d732d616e616c79746963732d706c7567696e3f6c6162656c3d737461626c65267374796c653d666c61742d737175617265)](https://github.com/softspring/cms-analytics-plugin/releases)[![Latest Unstable](https://camo.githubusercontent.com/80371908465d55ab54852bb11fd50b589b53421f1ac05b77984ec039d3e0ac23/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f6674737072696e672f636d732d616e616c79746963732d706c7567696e3f6c6162656c3d756e737461626c65267374796c653d666c61742d73717561726526696e636c7564655f70726572656c6561736573)](https://github.com/softspring/cms-analytics-plugin/releases)[![License](https://camo.githubusercontent.com/8cd000c0bd93f15dd4e2a5da7b9e864ef7d9e8a659c3c453d51bc1187b20afa4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736f6674737072696e672f636d732d616e616c79746963732d706c7567696e3f7374796c653d666c61742d737175617265)](https://github.com/softspring/cms-analytics-plugin/blob/6.0/LICENSE)[![PHP Version](https://camo.githubusercontent.com/7617d0e9fd1624360c941122ce9d5302b8a331d67aa2ffc85e28aaf198721e41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f736f6674737072696e672f636d732d616e616c79746963732d706c7567696e2f7068703f7374796c653d666c61742d737175617265)](https://github.com/softspring/cms-analytics-plugin/blob/6.0/composer.json)[![Downloads](https://camo.githubusercontent.com/e5521fa62cba6bb626c792642faf224d958ba0d8bda8c50f1277483e69ef8a27/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f6674737072696e672f636d732d616e616c79746963732d706c7567696e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softspring/cms-analytics-plugin)[![CI](https://camo.githubusercontent.com/ee2de5c4a79b2809b5bafbb368a39141b0b94abee014c12aa34af7d1369d30c4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f6674737072696e672f636d732d616e616c79746963732d706c7567696e2f63692e796d6c3f6272616e63683d362e30267374796c653d666c61742d737175617265266c6162656c3d4349)](https://github.com/softspring/cms-analytics-plugin/actions/workflows/ci.yml)[![Coverage](https://camo.githubusercontent.com/ac54da102500427419fcc2b4b11b7a951d7d371cea2ea08e9ff6b06a4661e695/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f736f6674737072696e672f636d732d616e616c79746963732d706c7567696e3f6272616e63683d362e30267374796c653d666c61742d737175617265)](https://app.codecov.io/gh/softspring/cms-analytics-plugin/tree/6.0)

> **Experimental package:** this plugin is in active development and its configuration, analytics provider integration, UI, and extension points may change before a stable release.

`softspring/cms-analytics-plugin` adds page-level analytics to Armonic CMS administration and exposes a provider-agnostic statistics API for other CMS plugins.

It resolves the configured URLs for a CMS content item, queries the configured statistics provider for each URL, and shows totals and per-URL metrics in the content administration screen. The plugin ships a Plausible provider; projects can add GA4 or other providers behind the same statistics API.

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

[](#installation)

```
composer require softspring/cms-analytics-plugin:^6.0@dev
```

The plugin requires `softspring/cms-bundle`, Symfony HttpClient, and a cache service.

Register the bundle if Symfony Flex does not do it automatically:

```
// config/bundles.php
return [
    Softspring\CmsAnalyticsPlugin\SfsCmsAnalyticsPlugin::class => ['all' => true],
];
```

Configuration
-------------

[](#configuration)

Each CMS site reads provider configuration from `site.extra.analytics`.

Select the active provider with `site.extra.analytics.driver`. When no driver is set, the plugin uses the Plausible provider as the default.

Plausible configuration lives under `site.extra.analytics.plausible`:

```
site:
    extra:
        analytics:
            driver: plausible
            plausible:
                enabled: true
                api_base_url: '%env(PLAUSIBLE_API_BASE_URL)%'
                api_key: '%env(PLAUSIBLE_STATS_API_KEY)%'
                site_id: '%env(PLAUSIBLE_SITE_ID)%'
```

Use a Plausible Stats API key. Do not use or share personal account credentials for integration tests. Set real keys in local or deployment secrets, not in committed files.

The default Plausible API base URL is `https://plausible.io`. Override `api_base_url` only for self-hosted Plausible installations or compatible endpoints.

Google Analytics 4 configuration lives under `site.extra.analytics.google_analytics_4`:

```
site:
    extra:
        analytics:
            driver: google_analytics_4
            google_analytics_4:
                enabled: true
                property_id: '%env(GA4_PROPERTY_ID)%'
                credentials_json: '%env(GA4_CREDENTIALS_JSON)%'
                credentials_path: '%env(GA4_CREDENTIALS_PATH)%'
                dashboard_base_url: 'https://analytics.google.com/analytics/web'
```

`property_id` is the numeric GA4 property id. GA4 support needs the optional `google/auth` package:

```
composer require google/auth
```

Use either `credentials_json`, `credentials_path`, or neither. When both credential fields are empty, Google application default credentials are used. The selected identity must have read access to the GA4 property.

Usage
-----

[](#usage)

The plugin adds a `Statistics` tab to every CMS content type. It queries the statistics provider once per configured URL of the content and caches each response for 15 minutes through Symfony cache.

Supported ranges are:

- Last 7 days.
- Last 30 days.
- Last 91 days.
- Last 6 months.
- Last 12 months.
- This year.

Extension Points
----------------

[](#extension-points)

Add custom analytics providers by implementing `Softspring\CmsAnalyticsPlugin\Analytics\StatisticsProviderInterface` and tagging the service with `sfs_cms_analytics.statistics_provider`.

Replace `Softspring\CmsAnalyticsPlugin\Analytics\PlausibleConfigurationResolver` when a project stores Plausible settings outside CMS site configuration.

Replace `Softspring\CmsAnalyticsPlugin\Analytics\PlausibleStatsClient` when a project needs a different Plausible cache policy or query shape.

Replace `Softspring\CmsAnalyticsPlugin\Analytics\GoogleAnalyticsConfigurationResolver`, `Softspring\CmsAnalyticsPlugin\Analytics\GoogleAnalyticsAccessTokenProvider`, or `Softspring\CmsAnalyticsPlugin\Analytics\GoogleAnalyticsDataClient` when a project needs custom GA4 configuration, authentication, or query behavior.

Override Twig templates through Symfony template resolution when the admin screen needs project-specific layout or metrics.

Features
--------

[](#features)

See [FEATURES.md](FEATURES.md) for the functional scope of this package.

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

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md).

[Report issues](https://github.com/softspring/cms-analytics-plugin/issues) and [send Pull Requests](https://github.com/softspring/cms-analytics-plugin/pulls)

Security
--------

[](#security)

See [SECURITY.md](SECURITY.md).

License
-------

[](#license)

This package is free and released under the [AGPL-3.0 license](LICENSE).

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance92

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

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

39d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64ac79c0e14e0dd67af72d74bd3531606fb0484230c519a35682d54490f9be5b?d=identicon)[softspring](/maintainers/softspring)

---

Top Contributors

[![javihgil](https://avatars.githubusercontent.com/u/2581053?v=4)](https://github.com/javihgil "javihgil (7 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/softspring-cms-analytics-plugin/health.svg)

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

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M647](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1301.7M2.9k](/packages/contao-core-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k6.0M763](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M414](/packages/easycorp-easyadmin-bundle)[shopware/administration

Administration frontend for the Shopware Core

414.5M131](/packages/shopware-administration)

PHPackages © 2026

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