4 ms·
Hey, author here. For a bit of clarity around IP addresses hashes. The only use they have in this context is preventing duplicate hits in a day (making each pag
by HermanMartinus 3y ago
Hey, author here. For a bit of clarity around IP addresses hashes. The only use they have in this context is preventing duplicate hits in a day (making each page view unique by default). At the end of each day there is a worker job that empties them out while retaining the hit info.
I've added an edit to the essay for clarity.
- dantiberian 3y agoYou should add this as a reply to the top comment as well.
- bosch_mind 3y agoIf 10 users share an IP on a shared VPN around the globe and hit your site, you only count that as 1? What about corporate networks, etc? IP is a bad indicator
- Culonavirus 3y agoIt's a bad indicator especially since people who would otherwise not use VPN apparently started using this: https://support.apple.com/en-us/102602 https://support.apple.com/en-us/102602
- Galanwe 3y agoNot even mentioning CGNAT.
- HermanMartinus 3y agoYep, this is covered in the writeup. Results are accurate enough to gauge whether your post is doing well or not (keep in mind that this is a simple analytics system for a small blogging platform). I also tested it in parallel with some other analytics platforms and it actually performed better due to the fact that adblockers are more prevalent than IP sharing per reader in this context.
- victorbjorklund 3y agoAnalytics doesnt need to be accurate. The important thing isnt really exact how many visitors etc. The important thing is trends. Do we have more users now than last week? Do we get more traffic from X than Y? If it is 1000 or 1034 isnt so important.
- myfonj 3y agoHave you considered serving actual small transparent image with (private) caching headers set to expire at midnight (and not storing IPs at all)?
- HermanMartinus 3y agoThat's a pretty neat idea. I'll add it to my list of things to explore.