spatie/analytics-reports
Abandoned Laravel 4 package by Spatie to retrieve Google Analytics data via service provider/facade. Includes config publishing and depends on google/apiclient and thujohn/analytics. For Laravel 5+, use spatie/laravel-analytics.
google/api-php-client, which may need updates for modern GA4 scopes (https://www.googleapis.com/auth/analytics.readonly → https://www.googleapis.com/auth/analytics.readonly for GA4, but API endpoints differ).spatie/laravel-analytics (for GA4).illuminate/support).shuhei/laravel-ga4 or direct BigQuery integration are lower-risk options.Request/Response objects).AnalyticsReportsServiceProvider).array_merge_recursive) would need fixes.google/api-php-client:^1.0, which is outdated. Update to ^2.0 for GA4 compatibility.shuhei/laravel-ga4) or direct API integration. Recommended for new projects.ga:users with activeUsers.ga:date → date).laravel-google-analytics).google-analytics-data PHP client).activeUsers instead of ga:users").| Failure Scenario | Impact | Mitigation |
|---|---|---|
| GA4 API downtime | No analytics data | Cache reports; use BigQuery as a fallback. |
| OAuth2 token expiration | Broken authentication | Implement token refresh logic; use service account credentials. |
| Quota limits exceeded | Incomplete reports | Cache aggressively; implement request batching. |
| Data schema changes in GA4 | Report failures | Monitor GA4 release notes; test reports against staging data. |
| Laravel dependency conflicts | Integration failures | Use a compatibility layer (e.g., laravel-legacy-facade). |
| Fork abandonment | Unmaintained codebase | Contribute to a community fork or switch to a maintained package. |
How can I help you explore Laravel packages today?