simplestats-io/laravel-client
A lightweight Laravel client for Simple Stats, the privacy-friendly, cookie-free analytics platform. Track pageviews and custom events from your app using a clean API, Blade directives, and middleware, with GDPR-friendly defaults, simple configuration, and no complex setup required.
utm_* parameters are derived server-side from the Referer of the pixel request, so campaign reporting stays consistent whether a page was served from cache or from PHP. Without it, cached traffic contributes nothing to acquisition reporting — a silent skew that misleads channel-level decisions.?utm_source[]=x can't poison the pipeline. This is the kind of thing you normally only learn about after a board deck shows a fake traffic spike.Adopt or keep it when:
Look elsewhere, or at least de-scope, when:
Referrer-Policy (the release explicitly flags caveats here) — the beacon degrades, and you may end up with pageviews but no attribution.track, stats, analytics, beacon, collect or pixel are blocked by common lists. You can pick a neutral path, but you cannot guarantee delivery.One adoption gate worth putting in the ticket: this is a soft breaking change for extenders. CheckTracking::getPage() and CheckTracking::doTracking() gained an optional parameter, and any subclass overriding them will fatal on an incompatible declaration. If your codebase has custom middleware extending this, budget a signature update alongside the version bump.
To executives: We can make the site significantly faster by serving pages from cache, and still count every visit. Until now, any page served from a static cache was invisible to our analytics — we were effectively choosing between speed and knowing our traffic. This release removes that choice for the cost of one config flag and a small snippet. It also keeps our analytics first-party and JavaScript-light, which is cheaper to defend under privacy review than a marketing tag. No new vendor, no new contract.
To engineering: Upgrade is low-risk. The beacon is off by default; installs with an older published config register no new route and behave identically. Enabling it adds one GET endpoint that runs through the existing middleware stack, so bot filtering, visitor hashing and deduplication are unchanged — a cache miss plus its beacon counts as one visit, not two. Two things to get right: choose a beacon path that doesn't look like an analytics endpoint and doesn't carry a file extension (CDNs will cache it before it reaches the app), and if anything in our codebase subclasses CheckTracking, update the getPage()/doTracking() signatures.
To the product/analytics owner: Numbers should stop under-reporting on cached pages. Watch for two known boundaries in the first weeks: external referrer still needs JavaScript, and a strict Referrer-Policy will cost us attribution. Verify campaign reporting against source-of-truth for one cycle before we make any decisions off the new data.
Bottom line: ship it as an opt-in for CDN-fronted, PHP-bypassing sites; leave it off where PHP still runs. Re-evaluate a JavaScript-first analytics product only if client-side interaction data becomes a real requirement.
How can I help you explore Laravel packages today?