hamaryuginh/google-analytics-bundle
hamaryuginh/google-analytics-bundle offers a simple way to integrate Google Analytics into PHP applications, with configuration and tracking helpers that reduce boilerplate. A lightweight choice for adding analytics wiring to your project.
Short answer: almost none for a Laravel product — and that is itself the decision.
Bundle classes, DependencyInjection extensions, and service-container YAML/XML config that Laravel's container does not consume. There is no ServiceProvider, no config/*.php, no facade. Adopting it in a Laravel codebase would mean porting it, not installing it.ga.js/analytics.js). Universal Analytics stopped processing hits in 2023; GA4 uses a different data model and the Measurement Protocol for server-side events. Any library built around the legacy snippet should be assumed to need rework before it produces usable data.Consider it only when all of the following hold:
Look elsewhere — decisively — if any of these apply:
spatie/laravel-analytics for GA4 reporting) or call the GA4 Measurement Protocol directly via Laravel's HTTP client. Both are first-class fits and actively maintained.Additional adoption criteria worth stating plainly: MIT license is a genuine plus (forking is unencumbered), but license permissiveness does not offset abandonment risk. A useful rule for the team — a dependency should have either active maintenance or a named internal owner; this has neither.
Recommendation: do not adopt. Reject from the Laravel dependency evaluation.
spatie/laravel-analytics for reporting and a thin Measurement Protocol client for server-side events; estimate the spike at a day or two. Keep this repo on a "reference only" list at most.How can I help you explore Laravel packages today?