Updated 28-Jun-2024
The current system of analytics tracking is so very broken, let us count the ways:
Most solutions require third party trackers
- These are easily blocked by third-party ad blockers/privacy tools
- They are mostly javascript (and javascript can be disabled)
- They are a privacy nightmare, even when implemented properly
- They slow a site down by increasing http requests and the overhead of additional offsite requests
Most self-hosted solutions are equally bad
- Most self-hosted solutions, including open source, require either a cloud service, (again, the problems above),
- or a full application with mysql as a database (large overhead for small, low-volume websites).
Return of Weblog Analysis
What is needed, with a bit of fine tuning, is a basic weblog analysis. After all, most of what is desired can be managed through http headers, including using session and tracking cookies, all accessible from well-configured weblogs. In turn weblogs can be parsed and information structured and placed into additional logs and/or sqlite databases, which can then be accessed via clients for realtime or reporting data.
Apache log content available
Request information
- Host
- URL
- Query String
- Referer
Requestor information
- Client IP address (which can be then compared with GeoIP)
- Date/time of request
- User-agent
- Cookie information
Here is where the meat and potatoes are located. Of course initial requests may not have cookie data, but subsequent requests certainly can, including session (encrypted even) and user tracking (clickstream) cookies, including encrypted usernames/passwords. Shopping carts can be included in cookies (and therefore in http log files), and even properly annotated internal links. And all this without any javascript.
Apache per user Sessions
Apache supports user sessions, and also encryption of those sessions prior to being written to a database or http cookies.
Where Javascript is Needed
CSS Media Queries can help with responsive design detecting a viewport, but if a click needs to be detected or intercepted by the browser, without a new page being requested, that needs javascript. For example, if an image were to be a preview screen for a video, and on-click a video player were to repalce the preview image, and play, that would require javascript. If however, a new page were to be loaded, which also included a video player, and that video to begin playing, that would not require javascript.
The Calculated Payoff of no Javascript
If the cost of calling a new page were reduced below that of loading javascript, and then calling that javascript, then javascript would not be needed. In the case of the video player example above, if an html5 video player implemented minimal javascript, then it could outperform (even when requiring a new page to begin playing a video).