Check your website against incorrect Google Analytics implementations

Incorrect implementation of Google Analytics can result in erroneous statistics giving a wrong perspective on the status of your website and of the actions to take to improve it.
The most common error must be the duplicate inclusion of Google Analytics. It can happen quite easily in WordPress when both the theme and a plugin ask for your Google Analytics tracking code.

If you are in hurry and have no time to read the details, you can quickly test your website for Analytics mistakes with the tool I made:

A duplicate inclusion mean that the code provided for Google Analytics like below appears 2 times in a single page:

As a result, the function to report a page view is called twice.

This has 2 consequences:

  1. Double the number of pages viewed
  2. Drop the bounce rate

The bounce rate is the percentage of people viewing a single page before exiting the website. A high bounce rate may indicate that the user is not seeing any interesting or relevant link and decides to leave.

If your bounce rate is below 5%, you should check your site against a double inclusion of Google Analytics

When revamping a WordPress site for a customer, I noticed that the Google Analytics was included twice on the old website. I took note of it and added to my ToDo list to remove the duplicate code. I did realize consequences of this until I deployed the revamped site and that the miraculous 1~3% Bounce Rate of the site jumped to about 70% and that the Pageviews got divided by 2.

google-analytics-low-bounce-rate

Bounce rate jumping from 1~3% to ~70%

What happened became pretty clear: Including the Google Analytics code twice makes Google count each Pageview twice, thus dropping the Bounce Rate.

google-analytics-pageview-drop

Pageview divided by 2

It is not clear why the Bounce Rate was not 0%. Probably due to some loading errors or users exiting before both Google Analytics codes could run.

As a result, I developed a small tool to help people with limited technical knowledge to check their websites against various mistakes that can be made implemented Google Analytics.

Test your website now and for free:

11 Comments

  1. Kimm Boes October 1, 2014 9:33 am  Reply

    How do I know which GA code to remove?
    Thank you.

  2. Martin DENIZET October 1, 2014 1:44 pm  Reply

    Hello Kimm,
    According the GA instructions (Admin tab, Tracking Info, Tracking Code), the code can be included immediately after the opening of the body tag.
    If you cannot do that, you may check if there is an implementation within the head . You may want to remove it as the current trend is to get pages loading time to a minimum.
    Cheers,

  3. JanetGoingCrazy January 6, 2015 11:16 pm  Reply

    I am working on correcting this for a few clients and have noticed that if the blog started out on Blogger.com and then migrated over to WordPress. I cannot find the code twice on the WP blog because it is actually on the Blogger blog, but that redirects to the WP blog. Is there any way to make this stop double reporting?

  4. Jessica February 23, 2015 4:42 am  Reply

    Hi there,

    thank you so much for making this tool! My bounce rate fluctuates between 6-18% which seems really low to me. I checked my whole site for two codes and I can only find one. I even used this analytics checker and everything passed- it said everything was normal. I just feel like that bounce rate is not accurate. If you know anything else I should check for, I would love your input. Thank you!

    • Martin DENIZET February 23, 2015 6:06 am  Reply

      Hello Jessica,

      I found that there is an implementation of GA in the “SnapWidget” iframe but it does not run in the context of your website so that should not be the explanation. I used also a Chrome extension to debug GA and the only 2 calls I saw were from the normal implementation and SnapWidget.

      So to sum up: I don’t know.

      Note that GA events tracking will count as an interaction unless a specific argument is added. However I didn’t see a GA events implementation on your site…

      I’d suggest you to check the “behaviors” in GA reports to understand where people go if there are not bouncing. It’s probable that you could see them reloading the same page which could the result of a faulty link/image (though I didn’t see evidence of that 🙁 ).

      Cheers,

    • Rob Carson April 2, 2016 9:10 am  Reply

      Check and see if the Yoast SEO plug-in is the culprit. I added the code where the theme provided. But then after a Yoast SEO upgrade, it asked me for the code. I thought entering the code there just allowed the plug-in to provide the analytics information inside the WordPress site but now I know differently. I didn\’t discover this until a Google Analytics support rep informed me that the code was there twice.

  5. hello December 23, 2015 3:56 am  Reply

    Hi there,

    Our website has been having a very low bounce rate since was redesigned and trying to get to the bottom of it.

    According to your checker it is loading twice. How do I work out the problem? I can see in the source code that it has the script twice, though each with a different UA number – if the number is different would it still cause the double tracking?

    Any insights would be appreciated!

    • Martin DENIZET December 23, 2015 4:32 am  Reply

      Hello,
      You indeed have GA implemented twice (2 tracking codes, linked to 2 different accounts). It might be the reason for an abnormally low bounce rate.
      It is possible to implement GA twice without issue but I’m not familiar with the good practices of doing so.
      You should find the information you need to check your implementation there: https://support.google.com/analytics/answer/1032400?hl=en

      Cheers,

Leave a Reply