Webstats is a personal analytics project for sites that need useful traffic information without handing the whole job to a third-party dashboard. It tracks page views and click events, then presents the results in a protected PHP interface.
The tracker is a small JavaScript file that can be added to rendered HTML, PHP pages, WordPress theme output, and static hosts. It records ordinary page views and delegated link or button clicks, including elements added after page load.
The dashboard focuses on practical questions: which pages were viewed, what was clicked, where visits came from, and how activity changed by day. Reports use Eastern calendar-day boundaries with DST-aware date handling and zero-filled quiet days.
Data is stored in daily JSON files rather than a database server. That fits the modest personal-site scale of the project, but it also means storage limits, retention, locking, and backup behavior need to be explicit.
Privacy boundaries are documented in the project. Form values, cookies, raw IP addresses, user-agent strings, query strings, URL credentials, and fragments are not saved in event data. Paths and explicit labels are retained, so sensitive page names still need to be avoided or excluded.
The project includes a protected dashboard, password handling, CSRF checks, owner opt-out, named events, exclusions, rate limits, and a retention script. It also includes a WordPress integration path for loading the tracker on public theme pages while skipping logged-in administrators.
Webstats does not try to be billing-grade analytics or bot-proof measurement. Browser blockers, disabled JavaScript, interrupted navigation, spoofed requests, and offline behavior can affect counts. It is better understood as a transparent personal dashboard with known limits.
That honesty is the useful part. A small site owner can inspect the activity that matters, keep the data under direct control, and know where the numbers are approximate instead of pretending they are perfect.
Open the hosted project · Explore the project on GitHub
Update history
These notes record article updates associated with repository changes. The original publication date is retained.
- — Added the Webstats project article with notes on page-view tracking, click events, private reporting, WordPress integration, and protected JSON storage. GitHub source