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
Google Analytics Bundle

Google Analytics Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Simplify the management of interactions with google analytics

Frequently asked questions about Google Analytics Bundle
Can I install hamaryuginh/google-analytics-bundle in a Laravel app with Composer?
You can run composer require, but it will not work as a native Laravel package. This is a Symfony2 bundle, so it does not register a Laravel service provider, facade, config publishing, or package discovery. Expect to rebuild the integration as Laravel-native code rather than adopting it directly.
Does this bundle support GA4 and the Measurement Protocol?
There is no evidence it supports GA4; it likely targets legacy Universal Analytics, which is not viable for new implementations. The package description gives no details on client-side snippets versus Measurement Protocol. Treat GA4 support as unproven until a discovery spike confirms the actual tracking mechanism.
Which PHP and Laravel versions is this package compatible with?
It is a Symfony2 bundle, which implies PHP 5.x-era constraints and legacy Symfony dependencies. Modern Laravel versions require PHP 8.x and will almost certainly conflict. Validate the Composer constraints before planning any integration work.
How do I configure the tracking ID and credentials for this package?
Configuration is Symfony bundle style, typically config.yml parameters, not Laravel's config publishing and env-driven config. You would need to reimplement tracking ID, environment gating, and credential handling as Laravel config files backed by environment variables. Never hardcode tracking IDs or secrets in committed config.
Is this package actively maintained and safe to depend on?
No. It has roughly 4 GitHub stars, 0 dependents, and minimal community validation, which signals negligible support. With no meaningful ecosystem or documentation confidence, your team owns fixes, security review, and GA4 updates. The MIT license helps legally but does not reduce engineering ownership.
Does it handle GDPR consent, IP anonymization, and PII exclusion?
There is no confirmed consent, anonymization, or PII-exclusion support in the package. Analytics wiring that lacks consent gating risks compliance violations and accidental PII capture. Plan an explicit privacy review and implement consent controls, IP anonymization, and PII exclusion in your own Laravel layer.
Does it send data client-side via a JavaScript snippet or server-side?
The package description does not clarify whether it emits a client-side GA snippet, uses server-side Measurement Protocol calls, or both. This matters for consent, ad blockers, and performance. Confirm the behavior in a short discovery spike before deciding what code is reusable.
How do I test Google Analytics tracking in a Laravel application?
Keep tracking behind an interface and swap in a fake during tests, so you can assert dispatched pageview and event calls without real HTTP requests. Queue dispatch and use a log or null driver in local and CI environments. Add feature flags so tracking can be disabled per environment.
What are Laravel-friendly alternatives for sending Google Analytics events?
Prefer a thin, Laravel-native GA4 Measurement Protocol client with queued dispatch, explicit config, and testability. Libraries such as spatie/laravel-analytics are useful for reading GA reports, not for sending tracking events, so combine tools carefully. A small internal package is often the lowest-risk option.
Should we adopt this bundle in production or rebuild it for Laravel?
Adopt and migrate is not a safe production path; reference and rebuild is the recommended approach. Extract the useful concepts, including tracking ID configuration, environment gating, pageview and event dispatch, and consent controls, and implement them behind Laravel interfaces. Roll out behind a feature flag with structured logging and retry or dead-letter handling.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect