Out of principle I refuse to put any type of analytics on my sites. I don’t want to send user data to third parties and I don’t want to rely on data that comes from JavaScript on the browser unless strictly necessary.
But the thought recently occurred to me that I could use my server logs to create some basic data visualisation on Grafana.
I’d like very basic stuff:
- hits
- common referrers
- geo location by IP address
- bounce rates per page
What would be the recommended way to get this, assuming that I have traefik logs aggregates via Loki and Grafana installed?
I did something very similar with Opensearch rather than grafana, but it’s definitely possible. My setup:
It works well, but could be a bit simpler admittedly. You may choose to use Loki instead of Opensearch/Elasticsearch, and there are plenty of other log parsing tools out there.
Another, much simpler option is to just run Goaccess on your log files, either periodically to generate reports, or as a daemon to create a live dashboard.
Thanks, I think my question now is about figuring out if there is any ready-made dashboard for grafana. Maybe I just need to look a bit more.