homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: DixonJones & mademetop

Website Analytics - Tracking and Logging Forum

Google Analytics Installation
Which method do you use?

WebmasterWorld Senior Member pageoneresults us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3694259 posted 11:50 am on Jul 9, 2008 (gmt 0)

Google Analytics Installation Guide

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.



5+ Year Member

Msg#: 3694259 posted 8:32 am on Jul 10, 2008 (gmt 0)

Personally, putting the GA script near the end of the content is best, usually just before the </body>

My reason is that you want to track people who have successfully opened the page. Also, putting it early in the content would slow down the loading of the page.


5+ Year Member

Msg#: 3694259 posted 2:02 pm on Jul 10, 2008 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved