how to exclude internal traffic from google analytics

How to Exclude Internal Traffic From Google Analytics (EASY)

Disclaimer: This page may contain some affiliate links. If you click through and purchase an item, we may earn a commission. Thank you for supporting Minded Marketing!

As a website owner, the last this you want is anything to mess with your data. But did you know that you may actually be tampering with your own analytics? If you have yet to exclude internal traffic from your analytics, then you may be in for a surprise:

You are actually giving yourself false data.

Unfortunately, Google Analytics does not automatically exclude your own pageviews or admin views from your analytics reports.

This means that every time you are previewing a page or blog post, Google is counting it as a Direct view.

Fortunately, you can exclude internal traffic by using filters and blocking IP addresses.

So in this article, I am going to show you how to I finally managed to exclude internal traffic from my analytics, along with other solutions that you can use to filter your traffic.

Why is Google Analytics Important for Website Owners?

why is google analytics important

Google Analytics is one of the few ways that you can track all of the events on your website without sacrificing your page speed.

Plugins like Jetpack are great all-in-one platforms but they may take a toll on your website speed if you aren’t careful. GA (Google Analytics) not only gives you full analytics, but it does so for free and without sacrificing your site’s speed.

Having proper analytics is crucial for any online business to be able to scale. They will show you where your traffic is coming from, how they are getting to your content, how long they stay, and even what they do while they are on your pages.

This is exactly what you need to know in order to be able to optimize your content according to what is working best for you already.

For example, if you notice that one particular article or item tends to create longer sessions on your page, you may want to see how you can add more internal links to that page.

Now if these terms seem foreign to you, then you will want to read this article about the most important Google Analytics Metrics that all beginners need to know.

There you will learn all about the following metrics:

  1. Pageviews
  2. Traffic Overview
  3. New vs Returning Visitors
  4. Users/sessions
  5. Bounce Rate
  6. Average session duration
  7. Search Console Queries
  8. Behavior flow
  9. Landing Page
  10. Sessions by Channel
  11. All Pages

Understanding how these analytics work is crucial for your business and online growth.

What is Internal Traffic?

internal traffic on google analytics

You may have heard the terms internal traffic, admin traffic, or bot traffic and wondered what they mean.

These are types of traffic that you generally do not want to track. Unless you have a team of people working on your site that you need to track as well.

Internal traffic is the traffic that you bring to your website. Every time you preview a page or a blog post, this is counted as internal traffic.

The same logic goes for admin traffic as well. This is all the traffic that you are giving to your website when you are logged in as an admin.

Bot traffic however is quite different. This is basically any non-human traffic coming to your website from spiders are robots. This can include anything from bots that crawl your website for indexing to spambots.

Why Would You Want to Exclude Your Internal Traffic?

why you need to exclude internal traffic from google analytics

The main reason to exclude your internal traffic is to maintain the quality of your analytics and data.

When you have internal traffic in your stats, it tends to mess with your pageviews and your session duration stats.

This is because these numbers usually come in when you are working on your website, changing things around, and viewing the results.

This could result in sessions that are over 30 minutes long and several page views coming from one place.

An average session duration is generally 2-3 minutes long so that is a big difference. It will make your organic results seem minuscule when in fact, they are probably just fine.

Another reason you may want to exclude internal traffic is to avoid disappointment. If you are a beginner, the last thing you want is to log onto your analytics and see that you got 30 pageviews the day before, only to find out that they all came from yourself.

The letdown is quite painful.

Once you know that these pageviews are being counted, you may even be hesitant to preview how your pages are looking. When working on a website, you want to feel free to make as many tweaks and changes as you want without having to worry about your analytics taking a hit.

The last thing you want to do is limit yourself on your own website.

How do I Exclude Internal Traffic in Google Analytics?

There are two easy ways to exclude internal traffic from Google Analytics:

  1. Set a special Filter
  2. Block your IP adress

Each one has its own separate process and you will have to do some trial and error to see which one works for you.

How to Block Internal Traffic Using a Filter

You can easily create a filter in your GA Admin page that will exclude all “preview” traffic from your website.

Step 1- Go into your Admin Page and click on Filters

google analytics filter

Step 2 – Create a new filter and give it a name that you will recognize. For example, you can name it “WordPress Traffic.”

google analytics new fiilter

Step 3 – Under Custom, select Exclude. And then under Filter Field choose Request URI

google analytics custom request URI

Step 4 – You will have to enter a request in Filter Pattern. You may have seen a lot of people tell you to write preview=true, wp-admin, or wp-admin.php.

If you do choose wp-admin, you will have to set up two filters.

One for your general admin panel using a predefined filter:

Then another filter where you set a filter pattern for wp-login.php.

If you only want to block your “preview” stats, here is the request that I find has worked the best:


Step 5 – select which view you want to save it to and verify your filter to make sure that it is working.

You can go into your website Admin Page, and preview a page. You should not see any real-time visitors on GA.

 no real-time traffic in google analytics

How to Block Internal IP addresses

Blocking IP addresses can be a bit more of a chore if you have a large list of people on your team. However, the logic is still simple to follow.

Step 1 – Find the IP address that you want to block. A quick google search of “what is my IP address” will help you with that.

what's my ip adress

Step 2 – go into your admin panel in GA and add a new filter. Give it a name that you will be able to recognize. For example, “my IP address.”

addding ip filter on google analytics

Step 3 – Select Exclude and under choose Filter Field, choose IP address.

excluding ip adress from google analytics

Step 4 – here is where you write the IP address that you want to block. Save it to the right view and test your traffic.

How to Exclude Multiple IP Address from Google Analytics

If you want to exclude multiple IP addresses then the process is similar however, you need to be a bit more meticulous.

Once you get into your Filters and create a new filter, you will need to choose Custom instead.

Then choose Exclude and IP Address.

blocking several IP adresses from Google Analytics

Under filter pattern, you can enter all the IPs you want to filter out BUT you will need to use some regular expressions to do so.

If the IP address is 12.345.67.89, then you will have to write:


then if you have another IP after that, you will need to separate it will a pipeline.


It is very important to make sure you do these write because if you do not, you may end up excluding all traffic from anywhere on earth.

Not a good idea.

So I highly recommend you read this article from Data Driven U which goes into further detail on how you can do this correctly.

How to Exclude Bot Traffic from Google Analytics

Bot traffic tends to have a negative connotation but it isn’t inherently bad. It all depends on where the bots are coming from and what they are used for.

Having crawlers are essential for indexing and for site audits so these are definitely bots that do not need to worry about.

Fortunately, Google is a Mastermind and knows all the familiar bots that are used on the internet. So they make it very easy for you to filter these out.

Go into your View Settings on the Admin page.

Toward the bottom, you will see “Bot Filtering” and you can simply click the checkbox and Google will exclude all hits from known bots and spiders.

excluding bot traffic from google analytics

Final Thoughts

I wish that I had known about the importance of filtering out internal traffic when I first started out blogging.

In my first month, I did a lot of tweaking and previewing of my pages without even realizing that these were ticking in on Google Analytics.

You can imagine my letdown my second month when I went from getting around 15 views a day, to a mere 2-3.

I couldn’t believe what was happening and I was sure that my analytics were wrong. But they weren’t.

The majority of the traffic was coming from my own IP.

At that point, you wanted nothing more than to delete all my data and start from fresh.

Not the wisest thing to do either.

I want to help as many people as I can avoid the mistakes I made and start off on the right path from the get-go.

So I hope that this will help someone start their analytical journey on the right foot.