freema/ga4-analytics-data-bundle
Symfony bundle for pulling Google Analytics 4 Data API reports into your PHP application. It wraps GA4 credentials and reporting queries in configurable services, making it easier to fetch metrics and dimensions without boilerplate.
isTransactionInAnalytics() check was cached as false for the cache lifetime, meaning a transient API failure could read as "customer did not purchase" for up to 24 hours. If we ever gate paywalled content, upsells, or onboarding on a purchase check, this defect is the difference between an inconvenience and a support-ticket generator.cache.prefix; AnalyticsCache::clear() now clears one client's entries instead of flushing the entire cache.app pool. That makes "refresh this client's analytics" a safe, product-facing action rather than a maintenance-window operation that quietly evicts unrelated cached data.Adopt when:
>=1.1.2. No code changes are required to upgrade, but cache keys change, so plan for a cold start: first calls per report and period go back to the API, which has quota implications on a high-traffic deploy.Look elsewhere when:
For executives: This release fixes a defect where one client's Google Analytics numbers could be served to a different client for up to 24 hours. For any multi-client or per-tenant reporting we intend to ship, that makes 1.1.2 the minimum acceptable version — it is the difference between "usable" and "not shippable." It also fixes a data-freshness bug where a failed purchase lookup was cached as "no purchase," and stops our analytics cache-clear from wiping unrelated cached data. Upgrade effort is close to zero: no code changes, a version bump and a cache warm-up. Strategic risk is moderate — small maintainer base — which we mitigate by keeping our own thin abstraction over it.
For engineering: Bump the constraint to >=1.1.2 and deploy outside peak traffic; the first call per report and per client re-hits the GA4 API because old cache entries are not read. Verify we are setting cache.prefix and that our runbooks reflect the new per-client AnalyticsCache::clear() semantics — any admin "refresh data" tool built against the old flush-everything behaviour should be reviewed. The release also drops the PHP 8.5-deprecated setAccessible() and the obsolete Guzzle choose_handler() fallback, and CI now covers PHP 8.1–8.5 against Symfony 5.4, 6.4 and 7.4, so we are clear on the upgrade path. Distribution no longer ships tests or tooling; run our checks against the upstream repo, and keep the package behind our own interface so an eventual swap stays cheap.
How can I help you explore Laravel packages today?