Welcome to WebmasterWorld Guest from

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

Does the GA code have to be at the bottom of the page?



8:45 am on May 28, 2007 (gmt 0)

10+ Year Member

They tell you to place it just before </body>.

I assume that this is done so that when users don't load the entire page, they don't get counted?

What happens if I place it higher up the page? I have an element in dynamic PHP pages that sets up the page type higher up - can I place my code there?


9:51 am on May 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

They suggest just above </body> so that all of your page will display as quickly as possible even if the G code is slow to load for some reason.

They used to recommend putting their code much earlier, but people complained. It isn't any sort of conspiracy!




10:59 pm on May 28, 2007 (gmt 0)

5+ Year Member

Putting the code much earlier means

website would be very slow in loading in browser


Featured Threads

Hot Threads This Week

Hot Threads This Month