Posted Thursday, 17 September 2009 at 22:38 by Andrew Liu
Tagged: Google Analytics
Read more blogs...
I had a small dilemma where, in programming a site, it would be a lot easier placing the Google Analytics snippet in the HEAD section. Then the thought came along "would this actually work?". In essence, yes, it should, and even Google suggests it does, as this post by Google demonstrates. As they suggest though, the javascript would be executed at the start of the page load, thus causing a (slight) technical speed slowdown in your page load. If the code were inserted at the bottom of the page (just before the closing BODY tag), the page would have already loaded (and probably rendered on the client's browser) before the Google Analytics code takes place.
One point of interest, that I only recently found out by accident, was that Google Analytics actually causes the browser to load a "GIF" file in the browser. Whats interesting (to me, as a programmer anyway) is:
Posted Tuesday, 19 October 2010 at 05:58 by Andrew Liu
Posted Sunday, 18 April 2010
Updated Sunday, 24 February 2013 at 06:39 by Andrew Liu
Posted Friday, 05 March 2010 at 23:13 by Andrew Liu
Posted Thursday, 04 March 2010 at 04:34 by Andrew Liu
Posted Wednesday, 03 March 2010 at 20:15 by Andrew Liu