Welcome to WebmasterWorld Guest from 54.163.49.19

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

Where do I put my Google Analytics code?

     
6:00 pm on May 17, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 11, 2005
posts: 88
votes: 0


I've been adding GA to several sites and last week I was using the new asynchronous snippet, which they said to put just before the closing </HEAD> tag.

This week, they no longer offer the old snippet and now the default is the asynchronous snippet, but now they give these directions:

Copy the following code, then paste it onto every page you want to track immediately after the opening <body> tag.


But if you read elsewhere in their help, they're still saying put it just before the closing </HEAD> tag.

I just want to be sure before I manually change dozens of static and dynamic pages. I also wonder whether I should now be moving the GA code on the other sites down immediately after the <body> tag?

Edit: Just read over at the official GA forum that any references to after <BODY> is a bug and should be ignored. The asynchronous code goes immediately before the closing </HEAD> tag.
6:47 pm on May 20, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Sept 26, 2006
posts: 145
votes: 0


Just read over at the official GA forum that any references to after <BODY> is a bug and should be ignored. The asynchronous code goes immediately before the closing </HEAD> tag.


Would you tell me the URL of the thread?
6:50 pm on May 20, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 11, 2005
posts:88
votes: 0


Here you go:

[google.com...]
8:33 pm on May 20, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Sept 26, 2006
posts: 145
votes: 0


Thanks!
4:42 am on May 22, 2010 (gmt 0)

New User

5+ Year Member

joined:May 22, 2010
posts:2
votes: 0


Don't question it, just do what Google says. Google directions are updated and maintained very well. If you have any ongoing concerns, put it on a few pages and check out the results - change, or not, accordingly.