Msg#: 3694259 posted 11:50 am on Jul 9, 2008 (gmt 0)
Google Analytics Installation Guide [google.com...]
I typically use the Basic Installation method but am looking at the options right now to see if we can ward off a small percentage of 404s that are coming from failed GA script execution. We seem to have narrowed that particular issue down to a laundry list of potential causes. One of them has to do with the browser not executing the JS in proper sequence which causes the second JS to fire before the first which in turns causes the 404 and the GA appendage to the URI.
I've seen people place their GA code after the <body> element. Before the closing </body> element as the Basic Installation recommends. I've also seen external references in the head. And, we are now working on serving the scripts dynamically, that would be the ultimate goal I think.
But, before we do, I want to find out from others how they are handling the GA scripts and what challenges you've run into with any 404s being generated by the scripts in the Basic Installation model.
If you're using event tagging (for things like opening PDFs or tracking off-site links), then you need the tracking code before those event handlers, which is why many of us put the tracking code just after the opening <body> tag.