GA4 Reports
Package docs status
Section titled “Package docs status”This page is generated from public package documentation in capell-4/packages and the package manifest checked into the source repository.
| Field | Value |
|---|---|
| Composer package | capell-app/ga4-reports |
| Package slug | ga4-reports |
| Product group | Capell Growth |
| Tier | premium |
| Bundle | growth |
| Runtime contexts | admin, console |
| Capell version | ^4.0 |
| Source repository | capell-app/packages |
| Source path | packages/ga4-reports |
| Docs source | packages/ga4-reports/docs |
| Manifest | capell.json |
What This Plugin Adds
Section titled “What This Plugin Adds”GA4 Reports is an Available, Schema-owning Capell package in the Capell Growth product group. It ships as capell-app/ga4-reports and extends these surfaces: admin, console.
GA4 Reports brings Google Analytics 4 into the Capell admin as cached daily snapshots, so owners see traffic trends, top pages, sessions, and conversions beside the content they manage. A scheduled sync authenticates with a Google service account, stores a configurable window locally, and powers dashboard widgets and overview stats that never call GA4 at render time. Setup status, sync history, and a swappable data-client contract keep the integration transparent and testable. Built for marketing and growth teams who want analytics signal in the CMS without standing up a separate reporting tool.
After install, admins get package-owned management or reporting surfaces inside Capell.
Status details:
- Status: Available
- Tier: premium
- Bundle: growth
- Composer package:
capell-app/ga4-reports - Namespace:
Capell\GA4Reports - Theme key: not applicable
Why It Matters
Section titled “Why It Matters”For developers: The package gives developers package-owned service providers, Actions, Data objects, models, Filament classes, and Blade views instead of pushing this behaviour into core or application code.
For teams: Pull Google Analytics 4 traffic, top-page, and conversion snapshots into your Capell admin on a daily schedule - no per-pageview API calls, no leaving the CMS.
Screens And Workflow
Section titled “Screens And Workflow”Screenshot contract: docs/screenshots.json.
- GA4 Reports dashboard page (admin, required).
- GA4 Reports setup status widget (admin, required).
- GA4 Reports settings (admin, required).
Technical Shape
Section titled “Technical Shape”- Service providers:
Capell\GA4Reports\Providers\GA4ReportsServiceProvider,Capell\GA4Reports\Providers\AdminServiceProvider. - Config files:
packages/ga4-reports/config/capell-ga4-reports.php. - Migrations:
packages/ga4-reports/database/migrations/2026_05_10_190852_01_create_ga4_reports_daily_metrics_table.php,packages/ga4-reports/database/migrations/2026_05_10_190852_02_create_ga4_reports_page_metrics_table.php,packages/ga4-reports/database/migrations/2026_05_10_190852_03_create_ga4_reports_sync_runs_table.php. - Settings migrations:
packages/ga4-reports/database/settings/2026_05_10_190853_01_create_ga4_reports_settings.php. - Settings classes:
GA4ReportsSettings,GA4ReportsSettingsMigrationProvider. - Models:
GA4ReportsDailyMetric,GA4ReportsPageMetric,GA4ReportsSyncRun. - Filament classes:
GA4ReportsPage,GA4ReportsDashboardSettingsContributor,GA4ReportsSettingsSchema,BuildsGA4ReportsDashboardWindow,GA4ReportsOverviewStatsFilamentWidget,GA4ReportsSetupStatusFilamentWidget,GA4ReportsTopPagesFilamentWidget,GA4ReportsTopPagesTableFilamentWidget,GA4ReportsTrafficTrendFilamentWidget. - Actions:
BuildGA4ReportsDigestAction,BuildGA4ReportsOverviewAction,BuildGA4ReportsTrendAction,BuildGA4ReportsWindowAction,BuildTopGA4ReportsPagesAction,CheckGA4ReportsCredentialsPathAction,ExportGA4ReportsDigestCsvAction,PersistGA4ReportsDailyMetricAction,PersistGA4ReportsPageMetricAction,RedactGA4ReportsSyncErrorMessageAction,ResolveGA4ReportsConfigAction,SyncGA4ReportsMetricsAction. - Data objects:
GA4ReportsConfigData,GA4ReportsCredentialsStatusData,GA4ReportsDailyMetricData,GA4ReportsDigestData,GA4ReportsOverviewData,GA4ReportsPageMetricData,GA4ReportsSyncResultData,GA4ReportsTopPageData,GA4ReportsTrendPointData,GA4ReportsWindowData. - Command signatures:
capell:ga4-reports-sync. - Console command classes:
SyncGA4ReportsCommand. - Manifest contributions:
admin-page: Capell\GA4Reports\Manifest\GA4ReportsAdminPageContribution,console-command: Capell\GA4Reports\Manifest\GA4ReportsConsoleCommandsContribution,dashboard-widget: Capell\GA4Reports\Manifest\GA4ReportsDashboardFilamentWidgetsContribution,health-check: Capell\GA4Reports\Manifest\GA4ReportsHealthContribution,model: Capell\GA4Reports\Manifest\GA4ReportsModelsContribution,overview-stat: Capell\GA4Reports\Manifest\GA4ReportsOverviewStatsContribution,scheduled-job: Capell\GA4Reports\Manifest\GA4ReportsScheduledSyncContribution,setting: Capell\GA4Reports\Manifest\GA4ReportsSettingsContribution. - Health checks:
Capell\GA4Reports\Health\Ga4ReportsHealthCheck. - Blade views:
packages/ga4-reports/resources/views/filament/pages/ga4-reports.blade.php. - Cache tags:
ga4-reports.
Data Model
Section titled “Data Model”- Required tables:
ga4_reports_sync_runs,ga4_reports_daily_metrics,ga4_reports_page_metrics. - Models:
GA4ReportsDailyMetric,GA4ReportsPageMetric,GA4ReportsSyncRun. - Migration files:
2026_05_10_190852_01_create_ga4_reports_daily_metrics_table.php,2026_05_10_190852_02_create_ga4_reports_page_metrics_table.php,2026_05_10_190852_03_create_ga4_reports_sync_runs_table.php. - Migration impact: run host migrations through the package install flow before opening package surfaces.
- Deletion/retention behaviour: Docs gap unless the package has an explicit pruning command, retention setting, or tested cascade path.
Install Impact
Section titled “Install Impact”- Admin navigation: adds package-owned Filament classes when registered.
- Permissions: none declared in
capell.json. - Public routes: none detected in package route files.
- Database changes: package migrations are declared.
- Settings:
Capell\GA4Reports\Settings\GA4ReportsSettings. - Queues or schedules: none detected in standard package paths.
- Cache tags:
ga4-reports. - Commands:
capell:ga4-reports-sync.
Common Pitfalls
Section titled “Common Pitfalls”- Run migrations before opening package resources or public routes.
- Configure package settings before testing production-like workflows.
- Run package commands from the host app; in this repository use
vendor/bin/pestfor package tests. - Keep
composer.json,composer.local.json,capell.json, docs, screenshots, and tests aligned when the package surface changes.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Check | Fix |
|---|---|---|---|
| Package surface is missing after install | Provider or manifest is not loaded | Confirm capell.json, package composer.json, and provider registration | Reinstall the package, refresh Composer autoload, and clear host caches |
| Admin screen or command fails on missing table | Package migrations have not run | Check the tables listed in Data Model | Run host migrations and rerun the focused package test |
| Background work does not run | Queue worker or scheduled command is not active | Check package jobs, commands, and host scheduler configuration | Start the queue or scheduler, then run the focused command or package test |
Quick Start
Section titled “Quick Start”- Install the package:
composer require capell-app/ga4-reports. - Run the required setup:
php artisan migrate. - Open the related Capell admin surface and verify GA4 Reports appears.
Next Steps
Section titled “Next Steps”- Package docs
- Overview
- Screenshot contract
- Marketplace assets
- Capell content language plan
- Capell documentation design system
- Capell and package ERD notes
- Focused tests:
vendor/bin/pest packages/ga4-reports/tests --configuration=phpunit.xml.