DEV Community

Discussion on: Fathom: An Open Source Google Analytics Alternative

 
sebastiandg7 profile image
Sebastián Duque G

Not really. What about SPAs?

Thread Thread
 
defman profile image
Sergey Kislyakov • Edited

Let's have a simple case. How are you going to analyze how much times a user clicked a button? I don't want to reload the page on each click (to send a GET request) and AFAIK there's no way to do that without JS. And if I can use JS for that case, why would I want to do that if I can simply myTracker.send({'action': 'my-button.click', ...})?

Thread Thread
 
shamar profile image
Giacomo Tesio

It's quite obvious that if you are using JS anyway, a little more bloat doesn't change much.

However there is often no reason to use JS and plenty of reasons to NOT execute third party's code on your users' machines if you care about your users' privacy and security.

Thread Thread
 
shamar profile image
Giacomo Tesio

If that button does anything relevant, it's going to leave evidences on your server anyway. Theoretically, we don't really need JS to reload a subset of a page on a button click: HTML and CSS are enough, with proper uses of IFRAME.

However you are right that, if you are using JS anyway, a bit more bloat doesn't change much.

The point is that we shouldn't use JS just because it exists, but only if there's something we cannot really do otherwise. Forcing our users to execute code we didn't write and we don't feel responsible for is rude: we are wasting their resources (and potentially compromising their security) just to save some money.