Aug 26, 2016

How to Confirm Google Analytics is Installed Correctly

How to confirm GA is correctly installed on your blogGoogle Analytics is the gold standard of traffic monitoring software.  When site owners talk about their monthly page views or uniques, they are almost always referring to their numbers form Google Analytics.  This tracking software is the most accurate and therefore should be installed on your blog if you ever need access to your traffic statistics (don’t EVER use numbers from Blogger!)

However.. this accuracy is only true if you have Google Analytics installed CORRECTLY on your site.   This means the tracking script should be installed only one time, and in the correct location on the page.  If you have duplicate versions of the tracking code or have it installed too early in your head section, you can get falsely inflated analytics.

To demonstrate just how dramatic this inflation can be, I did an experiment on my own site.  I installed a second tracking code into my html and then watched my traffic over the next 4 days.  This is what happened:
Pageviews
My page views doubled and my bounce rate dropped to about 10%.  
As much as I wish those numbers were true.. They are completely an artifact of the duplicated code. 



Yes, I am aware some bloggers have actually installed the code multiple times on their site so they can inflate their page views, but remember, the page views and low bounce rate are NOT real.  It is really easy to find out if someone has the code installed twice, and most brands and ad networks can check in less than 30 seconds.  It isn’t worth your reputation to inflate your page views.

Of course, many people UNKNOWINGLY have Google Analytics installed twice.  They aren’t aware their traffic numbers are incorrect. That is why I wrote this post.


Checking for Google Analytics Scripts in the Source Code

It is actually very straight forward to check.  First you want to open you blogs home page and then you want to look at your source code. To do this in Chrome it is found under View >> Developer >> View Source
Source code in chrome

In Safari it is found under Safari >> Preferences >> Advanced >> Show Develop Menu in Menu Bar  Safari developer tools

Close preferences and then select “Show page Source” from Develop Menu
Developer tools safari

When you are on your home page and select “Show Source Code” a new tab will automatically open.  It will be a long block of html, and although it may appear intimidating, it really is nothing more than your blog’s template and post content. Source code example

Locating your Google Analytics Tracking Scripts

To find your Google Analytics script you want to click inside the browser window with your source code and hit Control-F.  This will bring up the search bar.
Type in:
 UA-  
How to find analytics in your source code
In a perfect scenario you will only see that code only shows up one time.  But most blogs aren’t perfect.

Types of Analytics Tracking Scripts

There are typically two types of analytics scripts you will find on Blogger blogs. The first is the one that is automatically added when you add your analytics number to your blog’s dashboard.  “The Built In Method”
That script looks like this:
UA tracking code example 1
This type of tracking code may also add a your Analytics number to the “widget manager” since that is how Blogger installs your analytics code, via a widget.  So when searching for “ UA-"you may find your account number twice.. Even thought it is only one actual script.

The other type of script is the type you generate in Google Analytics and manually add directly to your template. (If it is installed in the right place, this could should be found immediately before </head> in your template.)
The code will look like this:
UA tracking code 2
If this is the code you are using it should be found in your code only one time.

What to do if you have multiple copies:

IF YOU ARE SEEING BOTH OF THESE SCRIPTS OR MULTIPLES OF EITHER TYPE.. you  need to remove all but one copy!
You can either remove your tracking ID from the dashboard
Settings >>  Other >> Google Analytics  

Or you can search your template for the code and delete from the <script> to the </script>

Template >> Edit HTML >> Find “UA-“ 

Once you have deleted the extra copies, repeat the process of searching the source code for "UA-“ to confirm you have correctly removed the duplicates

Other things to watch out for:

If you have tracking codes for some ad or sponsored posts networks they may have their own version of Analytics.  If you find a tracking code with a DIFFERENT ANALYTICS NUMBER than the one in your Google Analytics account, this may be the case.   Having a second script with a different UA- number is not a problem, and you don’t have to worry about it.
Tag manager
Some people have more than one analytics accounts (either accidentally or intentionally) and in that case you will find the “UA-“ code more than once, but it should have two different account numbers.


It is worth taking a few minutes to check that you have your Google Analytics installed onto your blog correctly in order to get more accurate traffic information.  

3 comments:

  1. Kim,
    Thanks for the awesome information.
    Karen Marie

    ReplyDelete
  2. Thanks Kim. Can I hire you to check mine. I can't figure it out.

    ReplyDelete
  3. Despite the fact I was convinced it was only there one, I did find it twice! Thank you!

    ReplyDelete