jeffersongoncalves/laravel-ga4
Laravel GA4 offers a simple integration for Google Analytics 4, letting you send events and page views to GA4 directly from your Laravel application. Configure your measurement ID and start tracking server-side events quickly.
sendEvent() (Measurement Protocol) supports conversions that never touch the browser: renewal/subscription events, offline or back-office actions, mobile app events, and traffic lost to ad blockers or ATT. This is often the single highest-value item here and can materially change reported conversion volume and channel attribution.runReport() / runRealtimeReport() make it feasible to ship in-product dashboards (admin panels, customer-facing metrics, internal ops views) without a separate data pipeline. Realtime supports launch monitoring, feature-flag rollout observation, and incident triage.listConversionEvents() / createConversionEvent() enable programmatic provisioning of key events across environments, brands, or tenants — useful for multi-tenant SaaS or agency-style deployments where onboarding a new property is a repeatable workflow rather than a console task.Adopt it when most of the following hold:
google-analytics-data client code.Look elsewhere when:
batchRunReports, pivot reports, cohort/funnel/audience management, user-scoped custom dimensions, or Admin API operations beyond conversion events.For executives: This is a small dependency that lets us read Google Analytics 4 data and send conversion events from our backend without building and maintaining that integration ourselves. The practical upside is faster delivery of analytics-backed features and, more importantly, server-side conversion tracking — conversions we currently lose to ad blockers, browser restrictions, and offline flows. Cost and commitment are low: it is a thin wrapper, not a platform migration, and we can replace it with direct API calls if it stops fitting.
For engineering: A Laravel-native wrapper over the official Google PHP client covering three surfaces: Data API (runReport, runRealtimeReport), Admin API (listConversionEvents, createConversionEvent), and Measurement Protocol (sendEvent). It removes boilerplate around auth and request construction; it does not give you caching, quota handling, batching, retries, or a testing strategy out of the box. Treat it as a convenience layer, pin the version, wrap it behind our own interface so the analytics provider stays swappable, and confirm error handling and service-account credential management before we put it on a critical path. Scope is deliberately narrow — if a requirement needs batch reports, audiences, or funnel data, assume this package will not cover it and plan accordingly.
How can I help you explore Laravel packages today?