Google Analytics is an important tool that can help you or any website owner monitor visitor traffic.
It gives you a snapshot of your audience including their location, how they found your website, who they are, and what devices they use (such as desktop or mobile).
But often website owners don’t realize that they are inflating their traffic counts because they are including their own visits in the counts.
Therefore, this blog post will show you how to exclude internal traffic from Google Analytics so that your visitor counts are accurate.
Why We Use Google Analytics
With Google Analytics, you can monitor visitors in real time and see what web page they are viewing. You can track their locations, the keywords and sites that referred them, and you can even see conversions as they happen.
Monitoring visitors in real time can be helpful when you are getting ready to roll out a website update.
If you notice a lot of traffic at a certain time of day, you may choose to hold off on rolling out that update until there is less activity.
But before you can exclude internal visits from Google Analytics, you need to have Google Analytics code embedded into your website!
So make sure that’s done and then come back here to see how to exclude your visits.
If your ISP assigns you a dynamic ISP every time you log on, you will most likely want to install the Google Analytics Opt-Out Browser Add-On.
If that’ s you, skip the following section and go directly to the instructions below.
How to Exclude Internal Traffic from Google Analytics
First, you will need to create filters to exclude any internal IP addresses that could inflate your visitor count.
My research led me to a free e-book by Ana Hoffman entitled “Mommy, Where Does Traffic Come From?” published by Traffic Generation Café. I was reminded that Google Analytics tracks any and all visits to your site including your employees, virtual assistants, or the freelancers you hire to help you.
For many years the fix was quite simple. In Google Analytics, you need to create a filter with a list of IP addresses that should be excluded from your traffic counts.
And this was how you did it.
How to Exclude an IP Address in Google Analytics
Determine the IP addresses of all those who work on your site including web designers, virtual assistants, and any other freelancers.
You can look up an IP Address at: http://whatismyipaddress.com.
Next log into your Google Analytics dashboard, click the Admin tab, and select the website property that needs the filter as shown below:
Click the +New Filter button:
Follow the steps in the screenshot below:
That’s all there is to it!
Your direct traffic counts will most likely drop once the filter is applied. But from then on you will be correctly tracking your direct traffic.
There are a few other issues of which you need to be aware and they are explained below.
Dynamic IP vs. Static IP
However, depending on your Internet Service Provider (ISP), your IP address might keep changing.
This is because your ISP is using Dynamic IP addressing, which means you will be assigned a different IP every time you log on to your computer.
A Static IP, on the other hand, never changes. So if you have a need to know exactly what your IP address is, you will need to have a Static IP. The pros and cons of each if beyond the scope of this post, but you can learn more here.
In this case, we had to set a conditional filter that excluded IP addresses that began with certain numbers. The first two parts of the IP remained constant, so those were the numbers we had to match in our filter. Once done, we had effectively filtered his IP from direct traffic counts.
Best Way to Exclude Internal Traffic from Google Analytics
No matter what I did to try and block internal visits to our website, they kept showing in Google Analytics.
And I suspected it was the dynamic IP address that was being tracked as a new visit every time.
So I began the search to find the best way to exclude internal traffic from Google Analytics in 2019 and beyond.
That led me to a Google support article which explains how you can effectively exclude that traffic.
Google Analytics Opt-Out Browser Add-On
And you need to get the appropriate extension depending on what browser you are using.
So do a Google search and find the extension you need.
I use Firefox so this is how I added the extension:
Firefox Extension for Google Analytics Opt-Out
- From your Firefox browser, go to https://tools.google.com/dlpage/gaoptout?hl=en
- Download and save this file: “gaoptoutaddon_1.0.8.xpi”
- Do NOT click on the file because you most likely do NOT have a program that opens xpi files
- Instead open the folder containing the file “gaoptoutaddon_1.0.8.xpi”
- Next open a new Firefox tab
- Select Add-ons from the menu
- Drag and drop that downloaded file onto the list of currently available extensions
Then give it a few days to ensure that your internal visits are not being tracked.
And, as a side note, refrain from checking your site on mobile devices as this script does not work on them.
Changing Your WordPress Theme
Most WordPress themes provide a place for Google Analytics tracking code right within the theme options.
However, when you change your theme, most of the time you will lose this code.
That means that you will no longer be tracking your visitor counts. So it’s super important to remember to grab that tracking code and place it into your new theme.
Over to You!
So by now you should understand the importance of excluding internal traffic from your analytics.
And hopefully, you’ll remember to include your tracking code if and when you change your WordPress theme.
Any other Google Analytics tips you care to share? We’d love to hear them!
Editor’s note: This post was originally published in June 2015. It has been rewritten and updated for accuracy.