softspring/cms-analytics-plugin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

softspring/cms-analytics-plugin

Composer 安装命令:

composer require softspring/cms-analytics-plugin

包简介

Analytics integration plugin for Armonic CMS.

README 文档

README

Latest Stable Latest Unstable License PHP Version Downloads CI Coverage

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.

It resolves the configured URLs for a CMS content item, queries Plausible Analytics for each URL, and shows totals and per-URL metrics in the content administration screen.

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

Each CMS site reads Plausible configuration from site.extra.analytics.plausible:

site:
    extra:
        analytics:
            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 integration is planned for a future version.

Usage

The plugin adds a Statistics tab to every CMS content type. It queries Plausible 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

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

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

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

Features

See FEATURES.md for the functional scope of this package.

Contributing

See CONTRIBUTING.md.

Report issues and send Pull Requests

Security

See SECURITY.md.

License

This package is free and released under the AGPL-3.0 license.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2026-06-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固