Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Ga4 Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for analytics plumbing. This is a thin Laravel wrapper over the GA4 Data, Admin, and Measurement Protocol APIs. The decision it unblocks is whether to spend engineering time on Google client setup, auth, and request shaping, or adopt an existing abstraction. At v1.0.0 with three API surfaces, the buy case is real but narrow.
  • Server-side conversion tracking. 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.
  • Instrumentation and reporting features. 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.
  • Conversion event lifecycle management. 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.
  • Roadmap prioritization. The package's limited surface area is itself a signal: it supports "GA4 as a reporting source for a few screens" but not "GA4 as our analytics platform." Decisions about how deep analytics goes in the product should assume a thin read layer unless you commit to broader tooling.
  • Not supported by this release: batch/pivot reporting, funnels, audiences, attribution modeling, or bulk data export. Any roadmap item depending on those is out of scope for this package today.

When to Consider This Package

Adopt it when most of the following hold:

  • The application is Laravel/PHP and you want GA4 access to look native (config, DI, facades, test fakes) rather than raw google-analytics-data client code.
  • You need a small, well-defined set of calls: standard and realtime reports, conversion event listing/creation, and event sends.
  • Server-side event delivery is a requirement — renewals, offline conversions, or client-side-loss mitigation.
  • You want programmatic conversion-event provisioning rather than manual console work per property.
  • You are comfortable with service-account auth and per-property access management being your responsibility.
  • You accept that v1.0.0 is an unproven baseline: expect API surface changes and pin versions.

Look elsewhere when:

  • You need broad GA4 coverage — batchRunReports, pivot reports, cohort/funnel/audience management, user-scoped custom dimensions, or Admin API operations beyond conversion events.
  • Your real requirement is warehouse-grade analytics (BigQuery export, ETL, dbt, BI tooling). Direct BigQuery export is the correct answer; this package is not a substitute.
  • You need data aggregation, caching, or rate-limit/quota management as a first-class concern — those appear to be left to the caller.
  • You are not on Laravel, or you are on legacy Universal Analytics (unsupported).
  • You require vendor-neutrality across analytics providers; this wrapper is GA4-specific by design.
  • You need production hardening evidence — retries, backoff, observability, error taxonomy, and test doubles are not described in this release and should be verified before relying on it in critical paths.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log