toovalu/plausible-analytics-bundle
Symfony bundle for integrating Plausible Analytics, the lightweight, privacy-friendly web analytics tool. Configure your domain, inject the tracking script, and optionally track custom events without cookies or consent banners.
Bottom line: This is a low-signal dependency. Zero stars, zero dependents, and a zero score on the registry side mean there is no evidence of production use. It is technically small in scope (a Plausible Analytics client), so the risk is containable rather than architectural — but it should not be adopted as a trusted third-party dependency without a fork-and-own decision.
Architecture fit — first finding: framework mismatch. The -bundle suffix is Symfony convention (Toovalu is a Symfony/PHP shop), not Laravel. There is no ServiceProvider, no Facade, no config/*.php publish tag, and no Laravel package discovery. In a Laravel codebase it is not a drop-in: it is at best a set of autoloadable classes you wrap yourself. Treat any assumption of "install and go" as false until verified.
Scope fit. Plausible is a cookieless, privacy-oriented analytics platform with a self-hostable Community Edition and a cloud tier. The package's job is presumably to emit pageviews/events to a Plausible instance — either by injecting the frontend script or by calling Plausible's Events API server-side. Server-side event emission is the only reason to prefer a package over the standard snippet, so confirm which it does before anything else; if it only injects a <script> tag, the package is replacing four lines of Blade and has no reason to exist in your dependency tree.
Integration feasibility. Feasible but manual:
Symfony\Component\* interfaces or expect container wiring, standalone use in Laravel requires adapters or a fork.Illuminate\Support\Facades\Http); a competing HTTP abstraction is a source of conflict and a reason to prefer a thin in-house client.domain parameter, API key handling for cloud vs. self-hosted, and how it derives user-agent/IP).Technical risk.
Key questions to answer before committing:
symfony/* hard dependencies?Stack fit. Weak as a package, adequate as source material. The right posture in a Laravel app is to mine it, not to depend on it.
Recommended path (in priority order):
PlausibleClient interface with one method — event(string $name, array $props) — backed by Laravel's Http facade, configured via config/services.php and env vars. Bind it in AppServiceProvider. This is roughly 60–120 lines and eliminates the vendor, coupling, and version-conflict risks entirely.Migration path. There is nothing to migrate from — no existing telemetry to preserve. Treat this as a greenfield insertion: config → adapter → event call sites. Insert at exactly one seam (a single service) so that swapping to a maintained alternative, or to Plausible's client-side snippet, is a one-file change.
Compatibility. Pin PHP and Laravel versions explicitly in your decision record. Do not let an unmaintained package constrain a future Laravel major upgrade — another argument for the in-house client.
Sequencing:
Non-negotiable sequencing constraint: instrument error handling and fail-open behavior before the first production call site. Retrofitting that after a 500 from a slow analytics endpoint is far more expensive.
Maintenance. Effectively zero upstream. Budget for owning this code indefinitely; if you take the package as-is, plan a periodic review to see whether the API contract has drifted from Plausible's current Events API. An in-house client has the same drift exposure but no false impression of upstream support.
Support. None meaningful — no dependents, no community, no issue-tracker signal. Escalation path is "read the source." Acceptable for a 100-line analytics shim; unacceptable for anything adjacent to payments, auth, or PII.
Scaling. The scaling concern is not the package's CPU cost but call volume and ingest limits:
dispatch()->onQueue('analytics')), with a dedicated low-priority queue so analytics can be shed under load without touching user-facing work.Failure modes and mitigations.
| Failure | Impact | Mitigation |
|---|---|---|
| Plausible endpoint slow/unreachable | Request latency, possible timeouts | Short timeout (1–2s), queued dispatch, circuit breaker, drop on failure |
| Vendor abandoned / API drift | Silent telemetry loss | Fail-open with a sampled warning log; monitor event receipt in Plausible |
| Package pins conflicting dependency | Blocks Laravel/PHP upgrade | In-house client, or fork + pin |
| Silent IP/PII forwarding | Compliance exposure | Explicitly strip or hash IP; document in the privacy notice |
| Retry storms | Amplified load on recovery | Bounded retries with exponential backoff, then discard; analytics is lossy by design |
Ramp-up. Low engineering cost — the domain is simple and the code surface is small. The real ramp-up is operational knowledge of Plausible itself (self-hosting, retention, dashboard configuration, and what "events" vs. "pageviews" mean in the product). Allocate more time to the platform decision (cloud vs. self-host) than to the client integration; the former is the multi-quarter commitment, the latter is a day.
Recommendation. Do not adopt as a production dependency on the current evidence. Run the half-day spike, and default to a thin in-house Laravel client behind a single interface — using this package as a reference implementation at most. Revisit only if the repository shows active maintenance, tests, and real dependents.
How can I help you explore Laravel packages today?