Google Analytics

New Blogger Layouts and Google Analytics

9:50 PMWebmaster

Need some help in Installing Google Analytics in Blogger? or did you stumble here looking for New Blogger Layouts? Try our Template & Layout Finder.


Some people have reported that the new drag and drop layout of blogger does not work with google analytics. When testing the problem myself. I found out that the code which is typically in the format of

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-XXXXXX-X";
urchinTracker();
</script>


is changed to

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = &quot;UA-XXXXXX-X&quot;;
urchinTracker();
</script>


upon saving and probably that breaks the code. Actually this is an installation problem. you can't copy paste the code into the blogger layout code( because its XHTML code now). Google Analytics site recommends that you paste the tracking code before the </body> tag. That install procedure is outdated.

Below are the instructions for installing Google Analytics tracking code to new drag and drop layout of blogger/blogspot without problems.


  1. Login to your dashboard and click "Manage : Layout"
  2. On the template tab, select Page Elements
  3. On Page Elements, click Add a page element( I recommend adding it to the bottom of the page)
  4. On the pop up window click the "Add to Blog" option beside "HTML/JavaScript" Option
  5. On "configure HTML/JavaScript" popup window, paste the Google Analytics code in the "content textarea"
  6. Leave the title "blank" and Save Changes
Now, Google Analytics should be working on your blog. Leave your comments if Something still does not work.

Note : Google Analytics is working on a new version ( Which will probably be XHTML compliant). See more on this http://analytics.blogspot.com/2007/05/new-version-of-google-analytics.html .

Update: Some of the visitors have pointed out that the above method does not work correctly now,So, unless we find a workaround to make Analytics work with the new blogger, both would remain incompatible.

You Might Also Like

6 comments

  1. Thanks for helpfully posting this. I tried following your advice but Analytics still doesn't seem to be taking notice. Any further thoughts?

    ReplyDelete
  2. Anonymous22.6.07

    GA, does not work, keeps waiting for data & it never comes.

    ReplyDelete
  3. Thanks for the info, but as you've noted it does not work. I tried downloading the template, adding the analytics code and uploading the new template but that did not work either.

    ReplyDelete
  4. Cool Blog. Glad I found this.
    I have noticed that GA does say "waiting for data" but I am getting stats successfully.

    I have written a tutorial about getting Google Analytics configured for a blogspot blog. It is at:
    maximize-traffic.blogspot.com

    ReplyDelete
  5. Anonymous12.7.07

    Jul 17th - this is still a problem, and killing me. Am I going to have to go to wordpress? Come on google!

    ReplyDelete
  6. @ALL, this is october and it seems google has fixed its analytics code to make it compatible with XML layouts.

    ReplyDelete

Say something to us, we love to respond to our visitors

Popular Posts

Flickr Images

3/recentposts

Contact Form