# GA4 Reports reference

<!-- prettier-ignore-start -->

Developer reference for `capell-app/ga4-reports`. Start with the [README](../README.md) for what the extension does and how to install it.

## Package Details

GA4 Reports is an **Available** Capell package in the **Capell Marketing & Growth** product group. It ships as `capell-app/ga4-reports` and extends these surfaces: admin, console.

- Status: Available
- Tier: paid
- Bundle: marketing-growth
- Composer package: `capell-app/ga4-reports`
- Namespace: `Capell\GA4Reports`
- Theme key: not applicable

## Technical Shape

### Service providers

- `Capell\GA4Reports\Providers\MigrationMetadataServiceProvider`
- `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`
- `packages/ga4-reports/database/settings/2026_10_02_000001_add_ga4_reports_sync_cron.php`

### Settings classes

- `GA4ReportsSettings`
- `GA4ReportsSettingsMigrationProvider`

### Models

- `GA4ReportsDailyMetric`
- `GA4ReportsPageMetric`
- `GA4ReportsSyncRun`

### Filament classes

- `GA4ReportsPage`
- `GA4ReportsDashboardSettingsContributor`
- `GA4ReportsSettingsSchema`
- `BuildsGA4ReportsDashboardWindow`
- `GA4ReportsOverviewStatsFilamentWidget`
- `GA4ReportsSetupStatusFilamentWidget`
- `GA4ReportsTopPagesFilamentWidget`
- `GA4ReportsTopPagesTableFilamentWidget`
- `GA4ReportsTrafficTrendFilamentWidget`

### Extension contracts

- `GA4ReportsDataClientInterface`

### Actions

- `BuildGA4ReportsDigestAction`
- `BuildGA4ReportsOverviewAction`
- `BuildGA4ReportsTrendAction`
- `BuildGA4ReportsWindowAction`
- `BuildTopGA4ReportsPagesAction`
- `CheckGA4ReportsCredentialsPathAction`
- `ExportGA4ReportsDigestCsvAction`
- `PersistGA4ReportsDailyMetricAction`
- `PersistGA4ReportsPageMetricAction`
- `PruneGA4ReportsSyncRunsAction`
- `RedactGA4ReportsSyncErrorMessageAction`
- `ResolveGA4ReportsConfigAction`
- `SyncGA4ReportsMetricsAction`

### Data objects

- `GA4ReportsConfigData`
- `GA4ReportsCredentialsStatusData`
- `GA4ReportsDailyMetricData`
- `GA4ReportsDigestData`
- `GA4ReportsOverviewData`
- `GA4ReportsPageMetricData`
- `GA4ReportsSyncResultData`
- `GA4ReportsTopPageData`
- `GA4ReportsTrendPointData`
- `GA4ReportsWindowData`

### Command signatures

- `capell:ga4-reports-doctor`
- `capell:ga4-reports-prune`
- `capell:ga4-reports-sync`
- `ga4-reports:sync`

### Scheduled commands

- `capell:ga4-reports-prune (daily; package registered)`
- `capell:ga4-reports-sync (package registered)`

### Console command classes

- `GA4ReportsDoctorCommand`
- `PruneGA4ReportsSyncRunsCommand`
- `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\GA4ReportsRetentionScheduleContribution`
- `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

- 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: retention is scheduled through `capell:ga4-reports-prune` (daily; registered by the package provider).

<!-- prettier-ignore-end -->