Google Analytics and BloggerGoogle Analytics is one option if you want more detailed statistics about your blog than you can get from Blogger's Stats tab. It provides more features than most bloggers need, but it can be handy to use it from the beginning anyway, so that you have historical data when you do eventually want more detailed statistics.
It works by running a small script each time that a person views a screen from your blog: this reads some information about the person, their computer and what content they looked at, and adds it to a statistical database that you (and Google) can get reports from. It only collects data (number of visits, length of time spent, etc) from when the script is installed into your blog. Initially you had to install the code yourself, but a change that Blogger made in October 2011 made this a lot easier.
Now, to install it into your blog, you simply have to:
- Set up a profile for your blog in Analytics
- If your blog uses Dynamic Views or has a Mobile template enabled (*) (either all the time, or as an option): put the Web Property ID you get assigned in Analytics into your blog's options, AND
- Put the tracking code into your template, AND
- Save the changes that you have made to your profile (be careful - it's easy to forget this step!)
(*) At the time of writing (15 Oct 2011) the help materials weren't 100% clear about the status of mobile templates. My best guess is that you should install the Web-Property-ID anyway, just in case. But I will update this article if I find any more information.
How to set up an Analytics profile1 Log in to Analytics, using the Google account that you want to do reporting from. (If you're already logged in to Google when you go to that page, you may need to click the blue Access Analytics button).
This doesn't have to be the same account that owns or even has administrator rights to the blog that's being analysed - so long as you can figure out how to copy some code from Analytics into the blog.) Personally, I keep my Analytics statistics in the same account that I use for AdSense and AdWords.
2 From the Analytics Settings tab, choose Add New Profile (currently it's a link on the right hand side of the page)
3 Choose Add a Profile for a new domain
(I'm assuming that anyone reading this article doesn't already have a profile to be extending.)
4 Enter the name of your blog (including the www at the beginning of the URL), and press Continue
In the next steps, you need to copy two different items from this screen. So it's best if you leave this open, and switch to another screen to continue.
Putting the Web Property ID into your options5 Copy the Web-property-id from the top section of the screen:
6 Add ito your blog:
- Go to Settings > Other
- At the bottom of the screen, you will find a field for Google Analytics account number - paste the value you copied into this field
- Click Save Settings at the top of the screen
Analytics is used by many people running websites built with all sorts of tools, so the standard installation instructions are very general:
How to add the Analytics code to your site
Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag
The detailed instructions link in Analytics leads to the appropriate section in the Analytics help-centre. At one stage, this had a link to Blogger-specific instructions, but this seems to be gone. But I'm pretty sure that it said to find the <body> tag and paste the code from Analytics immediately after it. This still works, but it's harder to describe now, because some templates put other content in the body statement, and you need to locate the place after the angle-bracket ">" that closes the <body statement.
The Previous Instructions given by Analytics
Searching the help-centre for "blogger" shows various articles, including some that tell you to put the code into your template just before the closing </head> statement. Some of these remind you to download a full copy of your template before making changes to it - and none of them warn you about the disadvantages of editing your template.
A major advantage of this approach is that your statistics won't be interrupted if you change templates: remember that changing templates keeps your gadgets (though it sometimes moves them around), but deletes any template changes that you have made.
You do need to decide where to put the gadget: it doesn't actually show anything on the screen (except perhaps a small space that looks blank to your readers), but visitors to your will be "counted" when the gadget runs: if your blog page takes a long time to load, and your gadget is in the footer, then visitors who don't wait for the entire page to load before clicking away won't be counted. Personally, I like to put the gadget immediately under the Blog Posts gadget, like this:
IMPORTANT: Don't forget to press the orange Save button after your have shifted the gadget to where you want it to go.
After the code is installed, it takes a little time (maybe even 24 hours) for tracking to start. Once it's started, you can get reports by selecting the profile from the View Reports drop-down in the Analytics application.
Related ArticlesAdvantanges and disadvantages of editing your template.
Planning changes to your blog's template
Advertising on your Blog: some things to consider
How the data in Blogger is organised
Blogs, bloggers and Blogger, Post, Pages and Screens - some basic concepts
AdSense and AdWords - understanding the difference