3 ms·
The benefit with using JS instead of access logs are that scraping bots, security scanners etc usually don't call your JS analytics so for a small site the numb
by victorbjorklund 3y ago
The benefit with using JS instead of access logs are that scraping bots, security scanners etc usually don't call your JS analytics so for a small site the number % of bots can be 90% of the logs.
And you can use your analytics data to better understand your users because again most bots won't trigger your analytics script (because why would they execute it and waste their CPU cycles on that?). And yes, you can't trust the exact numbers (because adblockers, etc) but you can see the trends:
Page A has 1000 visitors per day. Page B has 10 visitors per day. We can conclude that A is more popular than B (why that is another question).
Or Page A had 100 visitors on average last month and now it has 1000 visitors on average. We can conclude it got more popular. Etc.
Do you need that for your personal blog? Probably not. Do you need that on your e-commerce shop to verify wether you 1 million dollar ad spend makes a difference or not? Probably.
- denton-scratch 3y ago> because why would they execute it and waste their CPU cycles on that? The analytics script is not run using your CPU cycles; those belong to your victim/target.
- joshyi 3y agoI think many developers overlook this aspect. If you're not in marketing, it's not just about tallying human visitors on our sites. It's essential to be vigilant against possible daily attacks and avoid excessive reliance on basic JS analytics. Even for personal websites, relying solely on JS can compromise security. We require precise data, and logs prove more dependable than JS, especially with the increasing number of tools tampering with JS data. We should steer clear of the trap of exclusively focusing on the count of human visitors.