Stop Google Analytics from Tracking Logged-in Users

How to Stop Google Analytics 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.

When you’re writing, editing, and previewing your site, it 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. So, in this article, we’ll show you how to exclude WordPress admin (logged in users) from Google Analytics tracking.

Why Exclude Logged in WordPress Users from Google Analytics?

Google Analytics is the most popular web analytics tool and helps you to track how your site visitors are interacting with your site. It provides you with detailed reports on your site traffic and users’ behavior on your site. Using your Analytics data, you can make informed marketing decisions to grow your business.

MonsterInsights is the best WordPress Analytics plugin. Get it for free!

However, your analytics data can be misleading if it’s not precise.

There’re many reasons why Google Analytics data can be inaccurate. One of the most common reasons is tracking logged in users. When you’re logged in as administrator, author, editor, or any other user role 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; but that isn’t due to an actual traffic increase. That’s simply because Google Analytics is tracking your admin visits as real visitors.

For example, if you’re frequently working and editing on your site, you’ll see a huge increase in traffic. Similarly, you may see a remarkable traffic increase on a page/ post after you’ve done some modifications to it.

This distorted data cannot help you improve your marketing. So, it’s always better to ensure that your own visits are not tracked by Google Analytics.

How to Exclude WordPress Admin from Google Analytics Data

There’re many ways to stop tracking WordPress admin visits in Google Analytics. For example, IP address filtering. Creating an IP address filter whitelists your IP address and stops tracking visits originating from that specific IP. That way, it doesn’t confuse the actual traffic with your own traffic.

However, the downside is it’s only applicable if you’re using a static IP address that doesn’t change.

A much better solution is to disable logged in visitors tracking, so you can stop tracking your own visits on your WordPress website, even if you’re using a dynamic IP.

Fortunately, there’s a very simple solution! MonsterInsights makes it really easy to exclude WordPress admin traffic from Google Analytics.

Before we get started, we’re assuming that you’re using MonsterInsights on your site and have configured it with Google Analytics.

Navigate to Insights » Settings from your WordPress dashboard and click on the Advanced tab at the top.

After that, you’ll see the ‘Permissions’ box which includes ‘Exclude These User Roles From Tracking’ option.

You can now specify user roles to exclude from tracking in Google Analytics.

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

That’s it!

You’ve successfully stopped tracking visits from the specified user roles in Google Analytics.

Creating a Google Analytics Filter to Exclude WordPress Admin Traffic (Alternative Method)

With MonsterInsights, it’s really easy and quick to exclude WordPress admin traffic from Google Analytics reports. But, if you insist 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, you’ll need to log into your Google Analytics account by visiting their official website. Then, go to the Admin option at the bottom of the left panel.


After that, click the Filters option below the View column.


Then, click the Add Filter Button. Next, you’ll see a page to add a filter to exclude WordPress admin page traffic.


You’ll need to enter a filter name. Then, select Custom from the Filter Type options. You’ll see the Exclude option at the top.

Choose Request URI from Filter Field options and enter wp-login.php in the Filter Pattern field.

Go ahead and click Save button.

Now Google Analytics will exclude traffic from your WordPress admin page (wp-login.php).

We hope this article helped you to learn how to stop Google Analytics from tracking logged in users to get accurate reports.

If you’re also running an email marketing campaign on your site, you might want to find out the most profitable email campaigns in Google Analytics. And don’t forget to follow us on Twitter and Facebook for more Google Analytics tutorials.

Want to Try MonsterInsights for Free?

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


  1. Nice article! I see the article didn’t explain specifically which roles will ignore your own visits if logged into WordPress. Will the standard “Administrator” and “Editor” suffice, or will I have to also include “Subscriber”?
    Thank you!

  2. If I exclude administrator, will it also exclude tracking for people logged into their own wordpress and browsing my site or will it just exclude me?

    1. Hi there,
      It will only exclude administrator users logged into your site. If someone else is an admin of their own WP install, and they are browsing your site it will not affect them

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.