PHPackages                             isapp/statamic-analytics - 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. isapp/statamic-analytics

ActiveStatamic-addon[Utility &amp; Helpers](/categories/utility)

isapp/statamic-analytics
========================

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

6.1.0(4mo ago)09[1 issues](https://github.com/isap-ou/statamic-analytics/issues)proprietaryVuePHP ^8.2CI passing

Since Jan 10Pushed 2mo agoCompare

[ Source](https://github.com/isap-ou/statamic-analytics)[ Packagist](https://packagist.org/packages/isapp/statamic-analytics)[ RSS](/packages/isapp-statamic-analytics/feed)WikiDiscussions 6.x Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (11)Used By (0)

Google Analytics (GA4) Dashboard
================================

[](#google-analytics-ga4-dashboard)

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+](https://camo.githubusercontent.com/1493e0d010dc67f6682a1bf253c04498351ea74434eaccba4244c7641c4d25ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d352e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/1493e0d010dc67f6682a1bf253c04498351ea74434eaccba4244c7641c4d25ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d352e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)[![Statamic 6.0+](https://camo.githubusercontent.com/e2d97a60f0486aada69d7bf68516cff0f0ed6d2ad2f935e8dc54767eefb3295d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d362e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/e2d97a60f0486aada69d7bf68516cff0f0ed6d2ad2f935e8dc54767eefb3295d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d362e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)[![License](https://camo.githubusercontent.com/283de2c488db47473621d30c704974e63dcff8ce9307a6bb77a655640a3d22f2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d50726f70726965746172792d696d706f7274616e743f7374796c653d666f722d7468652d6261646765)](./LICENSE.md)

> **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?
---------------

[](#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
------------

[](#key-features)

### 📊 **Dashboard Widgets**

[](#-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 &amp; Charts**

[](#-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 &amp; Efficient**

[](#-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**

[](#-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**

[](#-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
------------

[](#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 &amp; 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
------------

[](#installation)

Install via Composer:

```
composer require isapp/statamic-analytics
```

---

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

[](#configuration)

### 1. Set Up Google Analytics 4 API Access

[](#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](https://github.com/spatie/laravel-analytics)

### 2. Configure Your Environment

[](#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

[](#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)

[](#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`

[](#option-b-manual-configuration-via-cpphp)

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

[](#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
-----

[](#usage)

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

### Quick Start Tips

[](#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
------------

[](#requirements)

Requirement5.x branch6.x branchStatamic^5.0^6.0PHP^8.1^8.2Laravel^10.0^12.0Both branches also require:

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

---

Technical Details
-----------------

[](#technical-details)

### Statamic Version Support

[](#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 VersionFront-end stackCharting libraryStatamic 5.xVue 2Chart.js (MIT)Statamic 6.xVue 3ApexCharts (MIT)This ensures native UI integration, long-term compatibility, and optimal performance on each platform.

### Built On Trusted Technology

[](#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

[](#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

[](#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
--------------------------

[](#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 &amp; Documentation
---------------------------

[](#support--documentation)

**Need help?**
Open an issue on the [GitHub repository](https://github.com/isap-ou/statamic-analytics) for bug reports or feature requests.

**Setup assistance:**
Refer to the [spatie/laravel-analytics documentation](https://github.com/spatie/laravel-analytics) for GA4 API credential setup.

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

---

Credits &amp; Licensing
-----------------------

[](#credits--licensing)

Developed by **ISAPP** as a commercial Statamic addon.

**Built with:**

- [spatie/laravel-analytics](https://github.com/spatie/laravel-analytics) (MIT License)
- Google Analytics 4 Data API

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

---

Roadmap
-------

[](#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
-------

[](#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](https://statamic.com/marketplace) for current pricing.

---

**Ready to bring analytics into your Control Panel?**
[Get Started →](#installation)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance83

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.2% 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 ~16 days

Total

5

Last Release

62d ago

Major Versions

5.0.0 → 6.0.02026-01-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bfb1eae1e3e43813da6740e5eaa39307a95db7561c2d27e7e8aa24233cdcbeb?d=identicon)[andrii-trush](/maintainers/andrii-trush)

---

Top Contributors

[![andrii-trush](https://avatars.githubusercontent.com/u/14265776?v=4)](https://github.com/andrii-trush "andrii-trush (41 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

analyticsga4google-analyticsstatamicstatamic-addonanalyticsgoogle-analyticsstatamicga4Statamic addon

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/isapp-statamic-analytics/health.svg)

```
[![Health](https://phpackages.com/badges/isapp-statamic-analytics/health.svg)](https://phpackages.com/packages/isapp-statamic-analytics)
```

###  Alternatives

[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[fof/analytics

Tracks analytics using Google Analytics, Google Optimize/GTM and Matomo

3543.1k](/packages/fof-analytics)[visuellverstehen/statamic-classify

A useful helper to add CSS classes to all HTML tags generated by the bard editor.

20116.8k](/packages/visuellverstehen-statamic-classify)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

2381.5k10](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

13128.3k](/packages/withcandour-aardvark-seo)[aerni/livewire-forms

A Statamic forms framework powered by Laravel Livewire

2912.8k](/packages/aerni-livewire-forms)

PHPackages © 2026

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