How To Track Page Views on Blogger Using Google Analytics

Keeping track of all my blogs and their page views is almost a full-time job. Luckily, there is always the Google Analytics that made things much simpler to deal with. Although Blogger has started offering its own analytics, these are not as comprehensive as those from Google Analytics. in this article, I outline how you can set up Google Analytics to track your Blogger websites.

The first thing you need to set-up Google Analytics is to have a Google Account. Since this guide is primarily for Blogger users, I assume that you already have one.

If so, head over to the Google Analytics page and select “Sign Up Now“.

analytics-signup

Next you will be given more information about Google Analytics and the opportunity to create a new account. To do so select “Sign Up >>“.

On the next page you will have to enter the name of the website which you wish to analyse as well as the name of this Analytics account. Under a single Google Account you can create as many Analytics accounts as you like, and each account can have up to 100 websites. It is a good idea to keep your “Account Name” fairly general so that you can add a variety of websites under it. Finally, select the appropriate territory and time zone.

analytics-newaccount

You will then be asked to enter some more personal details, including your name and country.

analytics-name

The last step requires you to accept Google Analytics’ terms and conditions.

analytics-signup3

However, in addition to accepting the terms and conditions, be sure to have a look at the “Data Sharing Settings” by clicking on the “Edit Settings” link. Through these settings, you can determine how much information from the analytics Google retains.

analytics-datasharing

When you are satisfied with your selections, select “Create New Account“. You will be prompted to clarify your data sharing options.

Your account is now created and you will be provided with a tracking code to input into your website’s HTML template. This code is used to link your website with Google Analytics.

analytics-code

Select “Save and Finish” once you have copied the tracking code.

Finally, you will see an overview of your newly created account and your soon to be tracked website.

analytics-overview

As the screenshot shows, there is an “error” in the status. This is because the tracking code has not been copied to your websites HTML template.

This guide is primarily for Blogger accounts, however the tracking code can be pasted in the HTML template of most websites.

For Blogger Accounts: To copy this code into your website’s template head over to your Blogger dashboard and click on the “Design” link under the website which you wish to track.

blogger-dashboard

On the next page select “Edit HTML

blogger-design

You will see the full-text of your website’s HTML template. Check “Expand Widget Templates” to view all the HTML code. Then paste the tracking code just above the “</head>” tag.

blogger-code

The default tracking code is as follows:

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', <strong>'UA-XXXXXXXX-Y</strong>']);
_gaq.push(['_trackPageview']);
 
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? '<a href="https://ssl'">https://ssl'</a> : '<a href="http://www')">http://www')</a> + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

This tracking code will come with a  alphanumeric number known as the “Web Property ID”. This is the essential part of the tracking code and it is in the form “UA-XXXXXXXX-Y“. Remember to exchange “UA-XXXXXXXX-Y” with your actual Web Property ID when you paste it into your HTML template.

Once you have completed this select “Save Template“.

Your website will now be tracked on Analytics, but if it is not, head back to your Analytics overview page and select “Edit”.

analytics-overview2

Then select “Check Status“.

analytics-checkstatus

This will ping the tracking code in your website’s HTML template and Analytics will set to work collecting data for your website.

analytics-tracking

To add more websites to your Analytics account, simply select “Add new profile”.

analytics-new

analytics-new2

Once the data from your website is collected you will see a chart with all your information.

analytics-info

That’s it.