- Is modera/backend-google-analytics-bundle compatible with Laravel?
- No. It is a Symfony bundle, not a Laravel package. It has no Laravel service provider, facade, config publish command, or middleware, and its admin UI depends on Modera's backend-bundle shell, which has no Laravel counterpart.
- Can I install this package with Composer in a Laravel application?
- Composer may resolve the dependency, but the package will not work as intended inside Laravel. Its architecture assumes Symfony dependency injection and HttpKernel conventions. There are no integration points for a Laravel app, so it is not a viable dependency.
- Which Laravel versions does this package support?
- None officially. The package declares no Laravel support and targets Symfony instead. The framework mismatch is the primary blocker before any version compatibility discussion.
- Does it support Google Analytics 4 or only Universal Analytics?
- The generation of Modera bundles this belongs to typically targets Universal Analytics, such as a UA-* property, the ga() snippet, or the /collect GIF endpoint. Universal Analytics stopped processing standard hits in July 2023, so if that is the case the package is functionally dead regardless of framework. GA4 would require Measurement Protocol v2 with a measurement_id and api_secret.
- What Symfony and PHP versions does this bundle require?
- The provided context does not confirm exact version constraints. Modera bundles of this generation usually carry a Symfony version ceiling plus dependencies on other Modera bundles. Check composer.json before any spike, though this is largely irrelevant for a Laravel stack.
- How do I configure Google Analytics API credentials with this bundle?
- Configuration is handled through Symfony bundle configuration and Modera backend components, with some secure credential management support. In Laravel you would not use this mechanism. The equivalent is a config/analytics.php file plus environment variables or a secret manager for the measurement_id and api_secret.
- Is this package safe and maintained enough for production use?
- Technical risk is high. The repository shows zero stars, zero dependents, a single-maintainer origin, and no visible security response process, with no evidence of production use outside Modera. It is unaudited third-party code, and if it injects JavaScript into admin pages it becomes a CSP and XSS surface in the most privileged part of the application.
- What are the Laravel alternatives for tracking admin pageviews server-side?
- Build the pattern instead of buying the package. A route middleware or event listener filtered to authenticated admin routes can enqueue a pageview job, and a small GA4 Measurement Protocol v2 client can POST to the /mp/collect endpoint. A maintained Laravel analytics package is also an option if you prefer off-the-shelf code.
- Does the bundle send Google Analytics hits client-side or server-side, and is dispatch synchronous?
- The context does not confirm this, so it is a key question for any timeboxed spike. You need to determine whether it emits a UA /collect hit, gtag.js, or a GA4 Measurement Protocol v2 call. Synchronous dispatch in the request path would also be a performance concern compared with a queued job.
- How would I port this pattern to Laravel without using the package?
- Add middleware or an event listener on the web group, filter to authenticated admin routes, and enqueue a pageview job on a dedicated queue. Implement a short Guzzle call to the GA4 Measurement Protocol v2 endpoint and validate the client_id, events[].name, and page_location payload against GA4's debug endpoint. Store measurement_id and api_secret in the secret manager, and gate the feature off by default behind a flag.