承接 isapp/statamic-analytics 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

isapp/statamic-analytics

Composer 安装命令:

composer require isapp/statamic-analytics

包简介

Google Analytics (GA4) widgets for Statamic Control Panel powered by spatie/laravel-analytics.

README 文档

README

Transform your Statamic Control Panel into a powerful analytics hub. Monitor your site's performance, understand your audience, and make data-driven content decisions without leaving your CMS.

Statamic 5.0+ Statamic 6.0+ License

Commercial Addon
This is paid software. You may use it for development and evaluation, but a valid license from the Statamic Marketplace is required for production use.

Why This Addon?

Content creators and editors shouldn't need to switch between multiple tools to understand what's working. This addon brings Google Analytics 4 data directly into the Statamic Control Panel, giving your team instant access to the metrics that matter.

Perfect for:

  • Content teams who need quick performance insights
  • Editors wanting to see which pages drive the most engagement
  • Site managers tracking traffic trends at a glance
  • Agencies managing multiple Statamic sites with GA4

Key Features

📊 Dashboard Widgets

Beautiful, customizable widgets display your most important GA4 metrics right on the Control Panel dashboard. Get instant visibility into:

  • Top performing pages and posts
  • Traffic sources and channels
  • User demographics and device breakdowns
  • Custom date range comparisons

📈 Actionable Tables & Charts

Data is presented in clean, readable formats. Tables are sortable, filterable, and export-ready. Charts update dynamically and respond to your selected date ranges.

Fast & Efficient

Built on the official Google Analytics 4 Data API via the trusted spatie/laravel-analytics package. Data is fetched efficiently with smart caching to keep your Control Panel responsive.

🎨 Native Statamic UI

Every widget and view is designed to feel like a natural part of Statamic. Consistent styling, familiar interactions, and seamless integration with your existing Control Panel experience.

🔐 Secure Integration

Uses Google Cloud service account authentication for secure, server-to-server API access. No OAuth prompts, no user permissions headaches—just reliable data flow.

What You Get

This addon provides several pre-built widgets and views:

  • Visitor Overview – Total users, sessions, pageviews, and engagement metrics
  • Top Pages – Your most visited content with bounce rates and time on page
  • Traffic Sources – Where your visitors come from (organic, direct, social, referral)
  • Geographic Insights – Top countries and cities for your audience
  • Device & Browser Stats – Desktop vs mobile breakdown, browser usage
  • Custom Date Ranges – Compare any time period to understand trends

All widgets are configurable through the addon settings interface. Choose which metrics to display, set default date ranges, and customize the charts to suit your workflow.

Installation

Install via Composer:

composer require isapp/statamic-analytics

Configuration

1. Set Up Google Analytics 4 API Access

This addon uses the spatie/laravel-analytics package to connect to GA4. You'll need:

  1. A Google Cloud project
  2. A service account with Analytics API access
  3. A JSON credentials file
  4. Your GA4 Property ID

Detailed setup instructions:
Follow the official Spatie documentation to generate your credentials:
👉 spatie/laravel-analytics setup guide

2. Configure Your Environment

Add these to your .env file:

ANALYTICS_PROPERTY_ID=your-ga4-property-id
ANALYTICS_SERVICE_ACCOUNT_CREDENTIALS_JSON=/path/to/your-credentials.json

3. Add Widgets to Your Control Panel

There are two ways to add GA4 widgets to your dashboard:

Option A: Using the Control Panel (Recommended)

  1. Navigate to your Control Panel
  2. Go to Preferences → Widgets
  3. Click Add Widget
  4. Select the GA4 widgets you want to display
  5. Configure widget settings and save

Option B: Manual Configuration via cp.php

Edit your config/statamic/cp.php file and add widgets to the widgets array:

'widgets' => [
    'google_analytics',
    // Add more widgets as needed
],

4. Configure Widget Settings

Navigate to Control Panel → Settings → Analytics Settings to customize:

  • Property ID (by default it gets from config)
  • Default date ranges for widgets
  • Metrics to display

Usage

Once configured, your GA4 data will automatically populate in the Control Panel.

Quick Start Tips

For Content Editors:

  • Check the Top Pages widget to see which content resonates with your audience
  • Monitor traffic sources to understand where to focus your promotional efforts
  • Use date comparisons to spot trending topics

For Site Managers:

  • Review geographic data to optimize content localization
  • Analyze device breakdowns to prioritize mobile vs desktop UX improvements
  • Track campaign performance through traffic source widgets

For Agencies:

  • Configure different widgets per client site
  • Export data tables for client reports
  • Use cached data to minimize API quota usage

Requirements

Requirement 5.x branch 6.x branch
Statamic ^5.0 ^6.0
PHP ^8.1 ^8.2
Laravel ^10.0 ^12.0

Both branches also require:

  • A Google Analytics 4 property
  • Google Cloud service account with Analytics API enabled

Technical Details

Statamic Version Support

This addon fully supports both Statamic 5 and Statamic 6.

Because Statamic 5 and Statamic 6 use different front-end stacks, the addon uses different charting engines depending on the CMS version:

Statamic Version Front-end stack Charting library
Statamic 5.x Vue 2 Chart.js (MIT)
Statamic 6.x Vue 3 ApexCharts (MIT)

This ensures native UI integration, long-term compatibility, and optimal performance on each platform.

Built On Trusted Technology

This addon leverages proven, open-source packages:

  • spatie/laravel-analytics (MIT License) – GA4 API integration
  • Chart.js (MIT License) – Charting engine used for Statamic 5
  • ApexCharts (MIT License) – Charting engine used for Statamic 6
  • Google Analytics 4 Data API – Official Google API for programmatic data access

No Data Storage

This addon does not store, manipulate, or intercept your analytics data. It acts purely as a display layer, fetching data from Google's servers and presenting it within Statamic.

Performance Optimized

  • Smart caching reduces API calls and speeds up dashboard loading
  • Configurable cache durations let you balance freshness with performance
  • Lazy-loaded widgets prevent blocking the Control Panel UI

Frequently Asked Questions

Q: Does this replace Google Analytics?
A: No. This addon displays data from your existing GA4 property inside Statamic. You still need a GA4 account and tracking code on your site.

Q: Will this slow down my Control Panel?
A: No. Widgets load asynchronously and use caching. Most data requests happen in the background.

Q: Can I customize which metrics are shown?
A: Yes. Use the settings interface in the Control Panel to configure which metrics and charts appear in your widgets.

Q: Do I need to be a developer to set this up?
A: Basic technical knowledge is helpful for the initial Google Cloud setup, but once configured, it's entirely editor-friendly.

Q: Does this work with Universal Analytics (UA)?
A: No. This addon is built specifically for Google Analytics 4. UA has been deprecated by Google.

Q: Can multiple users see the dashboard?
A: Yes. Once configured, Control Panel users can view the GA4 widgets on their dashboards.

Q: Does this show real-time data?
A: Real-time visitor tracking is planned for a future version. Currently, the addon displays historical and recent data with configurable time ranges.

Support & Documentation

Need help?
Open an issue on the GitHub repository for bug reports or feature requests.

Setup assistance:
Refer to the spatie/laravel-analytics documentation for GA4 API credential setup.

Updates & changelog:
Follow the repository for version updates and new features.

Credits & Licensing

Developed by ISAPP as a commercial Statamic addon.

Built with:

Google Analytics and GA4 are trademarks of Google LLC. This addon is not affiliated with or endorsed by Google.

Roadmap

Planned features for future releases:

  • Real-time visitor tracking – Monitor active users on your site in real-time
  • Custom metric builder for advanced users
  • Comparison mode (period over period)
  • Scheduled email reports
  • Event tracking visualization
  • E-commerce metrics (for GA4 Enhanced Ecommerce)
  • User permissions for viewing and editing settings

Have a feature request? Let us know on GitHub!

License

This is commercial software. Purchase a license from the Statamic Marketplace to use in production.

License tiers:

  • Single site license
  • Multi-site license
  • Developer license (for agencies)

See the Statamic Marketplace for current pricing.

Ready to bring analytics into your Control Panel?
Get Started →

isapp/statamic-analytics 适用场景与选型建议

isapp/statamic-analytics 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「analytics」 「google-analytics」 「statamic」 「statamic-addon」 「ga4」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 isapp/statamic-analytics 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 isapp/statamic-analytics 我们能提供哪些服务?
定制开发 / 二次开发

基于 isapp/statamic-analytics 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-01-10