How to Insert Google Analytics Tracking Code into a Blogger Template - Guide

 (Updated on Oct 7-2013)
To insert Google Analytics Tracking Code into a Blogger Template is fairly easy to do.
First Add your BLOG to Google Analytics:
Steps:
  • Log in to your Google Analytics account
  • In Google Analytics click on “Add Website Profile” under your current web-site.
  • Select “Add a Profile for a new domain” and then enter the URL (domain name) in text box next to where “http://” is listed (write it like “myblog.blogspot.com”) and hit “Continue”
  • Highlight the tracking code and copy it to your clipboard
There are two ways to integrate Google Analytics Tracking Code in Blogger
1st
You can track traffic to your Blogspot domain on Blogger with Google Analytics. Follow these steps to add the tracking code.
  • Log in to your Blogger account.
  • Navigate to your blog's Settings > Other tab.
  • If you already have a Google Analytics account, simply enter your blog's Google Analytics Web Property ID (The property ID is a string like UA-000000-01)
  • Click Save to finish.
2nd  
Adding Code Manually
  • Log in to your Blogger account.
  • Look for Template
  • Click Template
  • Select the 'Edit HTML' tab
  • Scroll to the bottom of the code.
  • Find the tag < /body>, which usually appears towards the end of the code in the template.
  • **Find the </head> tag^ (closing head tag)
Copy and past the Analytics tracking code just above the tag< /body>
**Copy and paste Analytics tracking code, just before the closing </head> tag^.
^One of the main advantages of the asynchronous snippet is that you can position it at the top of the HTML document. This increases the likelihood that the tracking beacon will be sent before the user leaves the page. It is customary to place JavaScript code in the </head>section, and Google recommend placing the snippet at the bottom of the </head> section for best performance. Read detail HERE
I have pasted the Google analytics code just above the </head> Tag
  • Click 'Save Template.'

9 comments

Tavishi Sharma mod

I have followed this instruction while adding Google Analytics in blogger few days days back.
And yes i am able to see traffic details correctly.

Thanks to you for sharing this post on adding Google Analytics code correctly in blogger.

Reply

Thanks a lot. i have followed your steps and completed the google analytic code updated in my blog

Reply

If i do both the methods will there be any loss to my blog
www.knowyourandroid.com ?

Reply

Thanks for you help with this - I had searched a few places but was never able to 'hide' the HTML (I am very much a HTML novice). This was placed beautifully into my template without being seen. Hopefully will see some data recorded soon. Thank you :-)

Reply

Thanks for this, google's directions were really complicated, you made it so I could add my UA code in under a minute!

Reply

Hi @ Omi Mishra, Use any one one method, NOT the both. You need to add Google Analytics Web Property once(The property ID is a string like UA-000000-01)

Reply

that's really help me. thanks.

Reply

Thanks for information ! Firstly I put code before /body tag and it dose not work, but now I put it before /head tag and tracking is installed!

Reply

That was SO helpful, thank you so much! I had made a Google analytics account and have been wondering why it only showed 5 page views for the past 4 months. When I know for a fact that my family alone have visited more than that! Thank you!!! Google's instructions were so confusing!

Reply

Post a Comment