Analytics can be used on your blog to know how many people visited your blog and from where they came, also which posts are more popular.

The following stats are available on Google Analytics and its free!

  • visits
  • pageviews
  • bounce rate
  • average time on site
  • new visits
  • where the traffic is coming from – either direct traffic or referring sites like from a search engine.

This blog post will take you through how to set up Google Analytics on your blog as well as the process I followed to get Analytics on WordPress.

Step #1 – Setup a Google Analytics Account

You will need to start by creating a Google account. Then go to Google Analytics and sign up. Click on the “Sign Up” button and proceed to the next step which will ask you for your general information. Website URL, Account Name, Country, and Time Zone. Follow the sign up process and then when you get to a page that has ‘Tracking instructions” on it that is very important. That screen has the code you will need to copy and paste into your blog. Go ahead and click into the box and it will automatically highlight the entire block of code for you. Now you need to copy that code and paste it into notepad or into a MS Word document. Save it as you’ll need to use it later.

Selecting the code to paste in your blog
Selecting the code to paste in your blog


After you click on the “continue >>” button you will be taken to your brand new Google Analytics dashboard! You will see your blog listed but with no analytical data….yet.

The screen you see after you add the code to your blog
The screen you see after you have set up Google Analytics


Ok, now you are done with setting up your Google Analytics account. The next step is placing the tracking code into your blog template so it can report back to Google Analytics and provide you with some cool data points.

Ok, so I have tried to do this in WordPress but the free acounts in WordPress don’t allow you to do this only for the accounts where you get your own domian. So I created a Blogger account (New Marketing) and inserted the Google Tracking code into the Blogger HTML template.

Step #2 – Adding Google Analytics Tracking Code to Your Blogger Template

So, Login to your Blogger account and then click on the “Layout” => “Edit HTML” tabs. This will bring you to the template code. Before you make any changes, I advise you to back up your template just in case there are any problems. After you’ve done so, continue reading.

Now in the edit template html code window, scroll all the way to the bottom of your template code and look for the </body> tag. There should only be one of these closing tags in your template. If you can’t find it then your template wasn’t properly created and you should add one right above the </html> tag.The </html> tag should always be your last line of code in your template. It signifies the end of your template.

Ok, now go back to the code you saved before in a Word Doc from Google Analytics. You are going to copy it and paste it right above the </body> tag as illustrated in the image below. The yellow highlighted code is the new Google Analytics code I pasted into my template.

Insert the Google Anallytics code into your blog
Insert the Google Analytics code into your blog

Save your template and you shouldn’t get any error messages. If you do, it’s most likely not related to this Google Analytics code and something else with your template itself. Assuming you’ve been successful with your save, you are all done embedding the Google Analytics code in your template!

Step #3 – Confirm Google Analytics is Tracking

Go back into your Google Analytics account and look at your dashboard. Most likely you will see a little yellow exclamation mark under the “status” column. This means everything isn’t working properly yet which is fine because we are about to tell Google Analytics that you have just added the code. From your dashboard, click on the “edit” link which is located to the far right.

After you click on that link, you’ll see another screen like below. It will say “Tracking Not Installed” followed by a link “Check Status”. You’ll want to go ahead and click on that link which will tell Google Analytics to visit your site and look for the new code you just pasted in your template.

Check Tracking status on Google Analytics

Check Tracking status on Google Analytics

Assuming you pasted the code in there as instructed above, Google Analytics will find the new code and begin tracking everything on your blog. If you are still having problems, it’s most likely something to do with Google Analytics and you should read their help guide to troubleshoot your problem.

The message  “Waiting for Data” means you have correctly setup Google Analytics and data is being gathered! Click on the top left Google Analytics logo and it will take you back to your dashboard. From there click on the “View report” link and that’s where all your very important Blogger visitor data will start appearing!

Google Analytics Stats

Google Analytics Stats

Now it usually takes an hour or so before you will see any data (maybe longer if you don’t get much traffic to your blog) so please be patient. Trust me, you’ll be logging in at least once a day just to see how much traffic your blog is getting. It’s very addicting and powerful information to learn from. You’ll be surprised which posts are your most popular and what countries people are coming from to read your blog.

Google Analytics is very powerful and we have just learned how to install it into your Blogger template. We haven’t even scratched the surface on the features and reporting it can do. For most Bloggers, this will be enough. Data will be collected and you will just review it. Others with more in-depth goals (like selling products or services, creating a sales funnel, etc) will want to spend more time learning Google Analytics.

Hope you enjoyed the tutorial.




This blog is being completed as part of the requirements of the Digital Marketing academy.