atm-code/laravel-umami
Laravel integration for Umami, the privacy-friendly, cookieless analytics platform. Add tracking snippets to your Blade views, query stats through a fluent API client, and keep visitor data self-hosted and GDPR-friendly without cookies.
Architecture fit. still-code/laravel-umami is a thin, opinionated integration layer between a Laravel application and a self-hosted Umami analytics instance. It does not add an architectural tier — it injects a client-side tracking script (typically via a Blade directive in the base layout) and exposes a small server-side surface for forwarding events. For a Laravel monolith or a Blade/Livewire-rendered app this is a near-zero-friction fit. For an API-only or Inertia/SPA front end, the value drops sharply, because the package's core convenience (layout injection) assumes server-rendered HTML.
Integration feasibility. High. Published on Packagist, installable via Composer, config published to config/umami.php with environment-driven website ID and host. The realistic effort is measured in hours, not days, and most of that is standing up or pointing at a Umami instance, not wiring the package.
Technical risk. The dominant risks are not in the code path but around it:
fetch-metadata, laravel-pint-action). These carry no runtime effect. The only functional change is Laravel 12 compatibility.wire:navigate, or Turbo may not emit pageviews without manual calls. Verify against your actual front-end before assuming out-of-the-box coverage.Key questions for the maintainer / spike.
Stack fit. Best fit: Laravel 10/11/12 with Blade-rendered views, PHP 8.1+. Acceptable fit: Livewire apps (with per-navigation instrumentation). Poor fit: headless/API-only backends, or teams unwilling to operate a Umami instance.
Compatibility. 5.0.3 is a patch release within the 5.x line — no breaking changes, no config or API surface changes, no deprecations. The Laravel 12 addition is additive and backwards-compatible. Any application already on 5.0.2 can take this with a routine composer update and no code changes.
Migration path.
Sequencing.
composer.json, record the Umami server version, and note the upgrade-review owner.Maintenance. Low code-maintenance burden — the package is a few hundred lines of glue. The real ongoing cost is the Umami instance: container/host patching, database backups, retention policy, and TLS. Budget for that explicitly; it is often larger than the integration itself.
Support. No commercial support, no SLA. Escalation path is GitHub issues on a volunteer timeline. Mitigation: the package is small enough to fork and vendor internally if it goes stale — a genuine advantage of thin wrappers. Keep a named internal owner for both the package and the Umami host.
Scaling. The package itself does not scale — it emits an HTTP request per tracked interaction. Throughput concerns belong to the Umami instance and its backing database. At high traffic, watch for the tracking endpoint becoming a hot path and consider sampling or edge-side collection. Server-side event forwarding doubles the outbound request count; measure before enabling broadly.
Failure modes and blast radius.
| Failure | Symptom | Impact | Mitigation |
|---|---|---|---|
| Umami host unreachable | No data, no user-facing error | Silent analytics gap | Uptime check on the collect endpoint; alert on pageview volume dropping to zero |
| Ad blocker / CSP blocks script | Under-counted traffic, skewed toward technical users | Bad product decisions | Never use these numbers as a single source of truth for revenue or billing |
| Wrong/missing website ID | Data lands nowhere or in the wrong property | Wasted effort | Assert config presence at boot in non-production |
| SPA navigations untracked | Massive under-count after a front-end refactor | Metric discontinuity | Add a synthetic route-change test |
| Package abandoned upstream | Frozen compatibility with future Laravel | Forced fork or removal | Pin version; re-evaluate each Laravel major |
| Third-party script tag is render-blocking | Small LCP regression | Core Web Vitals | Confirm defer/async and measure before/after |
The critical design property to enforce: analytics must never be able to break page rendering or fail a request. Verify the package's script tag is non-blocking and that any server-side call is wrapped in a try/catch or queued.
Ramp-up. Low. A mid-level Laravel engineer can complete the integration and verification in under a day. The Umami instance setup is another half day for someone comfortable with Docker and a reverse proxy. No specialised analytics knowledge is required to operate it; interpreting the data is the harder half and is outside this package's scope.
Recommendation. Adopt 5.0.3 for Blade-rendered Laravel apps where privacy-friendly, self-hosted analytics is a requirement. Treat the release itself as low-risk housekeeping — the Laravel 12 support is the only substantive change and it is additive. Gate the decision on two things: a confirmed owner for the Umami host, and a front-end audit confirming pageview coverage for your navigation model.
How can I help you explore Laravel packages today?