Google Analytics is one of the most useful tools anyone with a website or blog can have! It’s also free! Extra bonus there, FO SHO. However, picture yourself sitting at home one day (kitty on lap, coffee in hand) looking at your metrics on Google Analytics, and you notice that your bounce rate and page views seem way too good to be true. I’m talking, a bounce rate lower than 20% and a huge spike in your page views. Is your blog just THAT great that people can’t get enough? Sorry to burst your bubble, but it’s not. Woah woah woah. Wait. I’m not saying that you’re blog isn’t great, I’m just saying that even the best bloggers out there get an average bounce rate of 70-80%. So if you’re looking at your metrics and seeing a bounce rate of 0.35% (like I was seeing) there definitely is a problem. But don’t fret my friend! The solution to this problem is actually quite simple. You most likely have Google Analytics installed twice.
Google Analytics installed twice? How did this happen? Well, when you started your blog, you might have signed up for Google Analytics, followed a couple of how-tos and manually entered that tracking code in the header section of your website. Great. Then, when you started getting a little more familiar with WordPress, you chatted with a couple other bloggers online and eventually discovered the magic of WordPress plugins! You might have downloaded the Google Analytics plugin or even sometimes the Yoast SEO plugin. Those are all great, but what they do when installed, is they add in their own version on the Google Analytics tracking code, so you end up with two: the new one from the plugin and the original one you had manually entered. And that’s exactly what I did.
Pin this to come back to it later!
How can I check if I have Google Analytics installed twice?
If you have the Google Analytics installed twice on your website/blog, you’ll be seeing two page views recorded for everyone visit and extremely low bounce rates. This isn’t good (even though it might look good!) because you’re then looking at artificially inflated statistics.
Now let’s hop right into how to verify if you actually have Google Analytics installed twice.
First, load your website or blog in a browser such as Chrome or Safari.
- If you’re using Safari, you’ll want to go to Safari > Preferences > Advanced – and check the box that says “Show Develop menu in menu bar.” Then, with your website open, click on the menu item Develop > Show Page Source.
- If you’re using Chrome, again, with your website open, right-click anywhere on the page and select View Page Source. Or, for the same result, you can click on the menu item View > Developer > View Page Source.
Now, whether you are using Safari or Chrome, a scary-looking page will open up with a ton of letters, numbers and symbols… Don’t worry! This is what makes up your website and that’s pretty cool.
All you’ll want to do here is find out whether or not two instances of the Google Analytics tracking ID are present.
- On a Mac, hit Command + F, and on a PC, hit Control + F to open up the little search bar.
- In the little search bar that appears up top, enter UA-. This is the beginning of your Google Analytics tracking ID.
- Basically, if the search result finds one instance, you’re good to go. If it finds two, then it’s installed twice, and that’s why you’re here!
To find your precise ID, you can log into your Google Analytics account, click on Admin (bottom left corner), click on Tracking Info in the middle column and then Tracking Code. This will open up another panel where you can find your own Tracking ID. Alternatively, you can do the search with your complete Tracking ID, but usually, just searching with the beginning being UA- will do the trick.
How do I fix Google Analytics Installed Twice?
The search result found two instances of Google Analytics. Ok, now you have couple of options here. If you have the Google Analytics plugin installed, but don’t use it on your dashboard, you can easily uninstall it and that will then, in turn, remove its instance of Google Analytics. Voilà! Second option, is if you DO like the Google Analytics dashboard plugin, you can then go ahead and manually remove the script you had originally installed in the header section of your website. Let’s walk through both options.
Uninstalling the Google Analytics Plugin
Log into your WordPress, and in the sidebar, go to Plugins > Installed Plugins. Find the Google Analytics plugin in your list of plugins, click on Deactivate and then Delete. That’s it! Easy peasy.
Removing the Google Analytics Script
This option is a little more daunting but still fairly easy! You most likely pasted the script in there yourself a while back, so it should be even easier to erase it now!
Log into your WordPress, and in the sidebar, go to Appearance > Editor. On the right-hand side, there will be a long list of themes. Scroll down until you find the header.php and click on it. Now, find the first head tag (it will look like this: <head>) and somewhere beneath that you should find the Google Analytics script you had originally inserted.
Before deleting anything, you’ll want to make sure you are erasing ONLY the exact script that is attached to Google Analytics. In order to find out what that script looks like, you’ll need to log into your Google Analytics account. Once logged in, click on Admin (bottom left corner), Tracking > Tracking Code (see the above screenshot). This will open up another panel with your Tracking ID and your tracking code. This code, sandwiched between the two <script> tags, is exactly what you’ll want to delete back in your WordPress header.
Back in your WordPress header file, select that Google Analytics code and erase it. Now save and that’s it!
Testing your Google Analytics
Now that you’ve gotten rid of the second instance of Google Analytics on your website, you’ll want to make sure the changes you made actually fixed the problem.
Open up your website/blog again in your browser of choice and open the source code. Hit Command + F or Control + F and search UA- again. This time however, you should only get one search result. This means that you’ve fixed the issue of having Google Analytics installed twice and your metrics will now be exact.
Sadly, your metrics won’t be AS impressive anymore (0.35% bounce rate, no more), but they’ll be accurate and you can now trust what you’re looking at to plan out future blog posts and content to be correct. For graph and report nerds like me, I find it interesting look at the huge increase in the bounce rate and the huge drop in the page views after I removed the second instance of Google Analytics (give Google Analytics about 24 hours to fully update your stats – so don’t panic if they’re aren’t any different right away). This also tells me that the fix worked.
See, here’s one day after making the fix: I went from basically a bounce rate of 1% (improbable!) to now around 75% (average!).
Some other things to consider…
If you have any adds with Google or any other sponsored post networks, those may have their own Google Analytics tracking numbers. If you find two or more tracking numbers in your website code, but they all have different UA- numbers, that’s perfectly fine! No need to worry about those because they aren’t logging the same information.
I also highly recommend making sure your website is properly backed up before attempting any modifications. It’s so easy to erase something by mistake in the code and one tiny modification can totally change everything! Another precaution I always make is before modifying any code (because I don’t trust myself with it! haha), is I’ll copy all of it and paste it in a note or text document. That way if I accidentally erase something I shouldn’t have (or the cat jumps on my keyboard), I can easily just paste the original code back in.
Did you have Google Analytics installed twice on your blog? Do you have any more questions? Let me know in the comments below. Happy blogging!