Stop Google Analytics from Tracking Logged-in Users

How to Stop GA4 from Tracking Logged In Users in WordPress

Do you want to stop Google Analytics from tracking logged in users? By default, Google Analytics tracks each and every pageview on your site, including admin pageviews and visits by bots.

So, when you’re writing, editing, and previewing your site, Analytics records each of your visits as a real pageview and prepares reports including those logged in pageviews.

The downside of those reports is that they prevent you from seeing your real website metrics, excluding your own traffic.

So, in this article, we’ll show you how to stop Google Analytics from tracking logged-in users in WordPress. There are 2 ways you can exclude users. You can skip ahead to any section you’re interested in learning about.

MonsterInsights is the best WordPress Analytics plugin. Get it for free!
  1. Easy Way – Automatically Exclude Logged-In Users with MonsterInsights
  2. Manual Way – Add Filters in Google Analytics to Exclude Internal Traffic

Why Exclude Logged in WordPress Users from Google Analytics?

Google Analytics is the most popular web analytics tool that helps you to track how your site visitors are interacting with your site. But, your analytics data can be misleading if it’s not totally accurate.

One of the most common reasons why Google Analytics reports can be inaccurate is because it’s tracking logged-in users.

When you’re logged in as an administrator, author, editor, or any other user role in WordPress and previewing your site, Google Analytics counts your visits as real visits and adds to your site’s total visits.

As a result, you may see a spike in your pageviews that’s entirely from your own visits to your site.

Let’s take a look at how can you exclude logged-in users and admins from tracking.

Automatically Exclude Logged-In Users from Tracking (Easy Way)

There’re a few ways to stop tracking WordPress admin visits in Google Analytics.

The easiest solution by far is to use a plugin. MonsterInsights makes it incredibly easy to exclude WordPress admin traffic from Google Analytics.

MonsterInsights is the best Google Analytics plugin for WordPress. It allows you to easily connect your WordPress site with Google Analytics so you can view all the data that matters most right in your WordPress dashboard.

MonsterInsights Home Dashboard

Plus, with the click of a button, you can set up sophisticated tracking features such as event tracking, eCommerce tracking, form tracking, custom dimension tracking, outbound link tracking, and more.

To stop tracking logged-in users, you can go ahead and grab a license for lots of amazing features or choose to start with the free version of MonsterInsights.

Once you have MonsterInsights installed, simply go to Insights » Settings from your WordPress dashboard and click on the Advanced tab at the top.

Now under the Permissions box, you can add different roles under Exclude These User Roles From Tracking option.

After specifying the user roles you’d like to exclude, click Save Changes.

Another advantage of using MonsterInsights is that it doesn’t track admin users by default. When you login to your WordPress dashboard, MonsterInsights will show you a popup to remind you that you’re not skewing your data.

This way your data remains accurate and you can continue to make changes to your website without having to worry about messing up your tracking data.

That’s it!

You’ve successfully stopped tracking visits from the specified user roles in Google Analytics. Now, let’s take a look at a more complicated way of excluding admin users from tracking.

Manually Create Filters to Exclude Logged-In Users

If you decide on using Google Analytics without a plugin, you’ll need to create a Google Analytics filter to exclude WordPress traffic.

Here’s how to do that step-by-step.

First, log in to your Google Analytics account, and select the website you’d like to create a filter for.

GA4 select account property

Then, click Admin in the left taskbar.

In the Property column, click Data Streams. Then, click into the data stream that your website is tracking with.

GA4 Data Stream

Then, scroll down and click on Configure tag settings:

Configure tag settings in GA4

On the next screen, scroll down and click Show all:

GA4 tag settings - show all

Now, click Define internal traffic:

Define internal traffic in GA4

Next, you’ll want to create your internal traffic rule. To do that, click the blue Create button:

Create internal traffic rule GA4 - ip address filter in Google Analytics

Here is where you’ll create your internal IP address rule. Give your rule a name (like “main office”). You’ll see in the dropdown down below where you have several different options for calling out your IP address or a range of them. When you have it set they way you’d like, click the blue Create button.

Create internal traffic rule configuration - IP address filter in Google Analytics

Now that your rule is created, you have to tell Google Analytics to exclude traffic using that rule. To do that, head back to the main GA4 admin screen and click on Data Settings » Data filters:

GA4 data filters

On the next screen, you’ll see a filter that was automatically created for you when you created your internal traffic rule. However, note that it’s in testing mode – it’s not excluding your internal traffic yet!

To change this, click on the arrow:

Internal traffic filter in GA4

Then, scroll down and click the Active radio button. Once Active is selected, make sure to click Save.

Edit data filter in GA4 - activate IP address filter in Google Analytics

That’s it!

We hope this article helped you to learn how to stop Google Analytics from tracking logged-in users to get accurate reports. Now, check out our guide on How to Track Link Clicks in Google Analytics 4 and WordPress.

And don’t forget to follow us on Twitter, Facebook and YouTube for more helpful Google Analytics tips and tutorials.

Want to Try MonsterInsights for Free?

Enter the URL of Your WordPress website to install MonsterInsights Lite.


  1. Hi there, I have issues with Google Analytics tracking my own admin visit and I do have those roles filled out in the permission boxes. Any idea what I can do and why it doesn’t work?
    Kind regards

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.