Dec. 16, 2020, 9 a.m.
UPDATE: I recently changed from a crontab to using the websocket and it works great. This post was extremely useful when setting up the websocket. (also some nginx info around the web)
goaccess /var/log/nginx/access.log -o /var/www/report.html --log-format=COMBINED --real-time-html --ws-url=wss://domain:443/ws --port 7890 --daemon
This year I built a middleware for Django to store data on visitors to websites. It would store things like the page they view, the site that referred them, and their IP address/country. This worked fine for the longest time, but it's very redundant since I already have this information in my Nginx (HTTP server) logs and it was stored in my database for my website. I still have one model (table) that I store just to keep a copy of it in case I delete the logs from Nginx.
Before you start getting paranoid just know, an IP address isn't private and all websites that you access usually have logs enabled to help debug issues to seeing when a bad guy tries to access things. Just to put your mind at ease I don't give out any of my data and nor will I ever.
*/10 * * * * goaccess /var/log/nginx/access.log -o /var/www/report.html --log-format=COMBINED
until next time