3 ms·
This slideshow lost all credibility when it said to put your analytics in the <head> tags. Sure some analytics providers might recommend you do that, but that i
by Duhck 13y ago
This slideshow lost all credibility when it said to put your analytics in the <head> tags. Sure some analytics providers might recommend you do that, but that is wrong and only serves to
A) Slow your site down
B) Introduce a single point of failure into your webpage
All scripts should be loaded either async or at the end of the dom.
- teamonkey 13y agoIf you load the analytics script anywhere other than the head, you potentially miss user input while the page is loading. For a slow-loading page, this could make you lose out on useful data. I realize that this argument is somewhat circular.
- Duhck 13y agoYou should avoid including script tags in the head because it introduces single points of failure in your app. Losing a few ms of 'analytics' time is better than providing your users with a broken site because your analytics scripts (or any other hosted JS files) didn't load and waited 5-15s to timeout (depends on browser). Steve Souders gives a great talk on this: http://www.stevesouders.com/blog/2010/06/01/frontend-spof/ http://www.stevesouders.com/blog/2010/06/01/frontend-spof/