Re: Every web site should...
>for analytical purposes
That's a very polite name for 'spyware'!
We all know that the reason for all this scripting is to track the user, the data is then used to tune the advert ecosystem. The problem up to now has been that browsers don't directly identify users and (I'm starting to have my suspicions about the new Chrome engines) so programmers have to use algorithmic workarounds to simulate the effect of accurate tracking (sometimes with amusing results).
The fix for the average JS programmer is to learn a real language and get a real job. JS has its place but it must rate as one of the most abused languages ever.