jeffersongoncalves/laravel-page-visits
A lightweight Laravel package for tracking page visits in your app. Record visits to routes and pages to see traffic patterns and popular content, without relying on external analytics services. Simple to install, configure, and extend.
count / avg / min / max / p50 / p95 / p99 (ms) on page_visit_daily_stats lets you answer "is the product getting slower?" and "which days did we breach our latency target?" without standing up APM.avg vs. p95 divergence on a given day is a cheap, credible "something changed" flag for a postmortem or a rollback decision.Adopt when:
php artisan migrate. No breaking changes from 1.2.x, but it is a deploy-coupled schema change, so schedule it rather than letting it ride a routine release.Look elsewhere when:
response_time_stats is null when no visit was timed, so the value of this feature is entirely dependent on how consistently your visit instrumentation records timings. Validate coverage on a sample of days before anyone builds a dashboard on it.Open questions to resolve before committing: is p95 over the day's full visit population or sampled? What's the retention story once page-visits:aggregate-and-prune prunes raw visits? And what's the query cost of the dashboard reading this column on your largest table?
To executives: the analytics package we already run now keeps daily latency percentiles — average, p95, p99 — alongside traffic, in our own database, at no additional vendor cost and with flat memory on peak days. It gives us a defensible answer to "is the product getting slower, and when did it start?" and a data-backed input to any APM renewal. It is decision support, not incident response: it won't page anyone at 3am, and it won't replace real-user monitoring if that need is real.
To engineering: 1.3.0 adds a nullable response_time_stats column to page_visit_daily_stats, populated by page-visits:aggregate-and-prune using SQL aggregates (count, avg, min, max, p50, p95, p99, all in ms) — so aggregation cost stays off the PHP heap on busy days. Upgrade is a published migration plus php artisan migrate; nothing breaks from 1.2.x. Two caveats to design around: stats are null for days with no timed visits, so timing coverage is a prerequisite for trusting the numbers, and the percentiles are daily server-side aggregates — treat them as trend signal, not a tracing or alerting substrate.
How can I help you explore Laravel packages today?