3 ms·
If 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 ma
by teamonkey 13y ago
If 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/