fluffydiscord/google-analytics-bundle
A Symfony bundle for integrating Google Analytics into your application, providing configuration and helpers to add tracking code and monitor page views and user activity from within your Symfony project.
fetch wrappers in each feature.render:started, near-term roadmap items can include analytics coverage without dedicated frontend tickets per component. This shifts effort toward event taxonomy, consent, and validation rather than wiring.fetch wrapper is a breaking change for any product area relying on it. This forces an explicit roadmap decision: migrate affected flows in v2.2.0, or pin the prior version while planning the transition.analytics:event CustomEvent lets the product route events to Google Analytics, GTM, or other consumers without coupling the package to a single vendor. This supports decisions to keep analytics destinations swappable.pushAnalyticsEvents(response) extends the same event model to a shop’s own AJAX calls, reducing inconsistent measurement between Live Components and custom endpoints.google_analytics_head() now emits the data-controller bootstrap, and stimulus_controller_name configures the identifier. This supports multi-brand or multi-tenant setups where controller naming must align with frontend conventions.Consider adoption when:
analytics:event CustomEvents in its own listener.pushAnalyticsEvents(response) rather than parallel tracking implementations.stimulus_controller_name, google_analytics_head()), for example in themed storefronts.Look elsewhere or defer when:
render:started hook provides little value.fetch wrapper in the near term and needs a zero-migration release.For executives: This release turns analytics instrumentation into shared infrastructure. Instead of each feature team writing and maintaining its own tracking code, Live Components automatically publish the events they already collect. That means faster measurement coverage, fewer inconsistencies in reporting, and lower long-term maintenance cost. The trade-off is a planned migration for any flows still using the old fetch wrapper.
For engineering: v2.2.0 replaces the documented fetch wrapper with a Stimulus data layer bridge. data_layer_controller.js listens to each Live Component’s render:started and pushes the events returned in that response. analytics_events.js exposes pushAnalyticsEvents(response) for non-component AJAX and emits each payload as an analytics:event CustomEvent, giving consumers a clean integration point. google_analytics_head() now renders the data-controller attribute on the data layer bootstrap, with stimulus_controller_name controlling the identifier. Treat the removal of the fetch wrapper as breaking: audit existing usages, migrate to the bridge or the explicit push API, and verify event payloads and consent handling before rollout.
How can I help you explore Laravel packages today?