How to Remove WordPress Admin Page Traffic From Google Analytics

Google Analytics analyse and measures traffic coming from any page of your WordPress website. It not going to excludes any traffic source whether it is coming from real visitors, bots or WordPress admins pages, it will measure each and every page views.  Even when we login in WordPress or preview some new post in the browser Google Analytics will also grab them.  But there are no benefits of getting page views from your own admin page it not only give a false traffic view but also clutters your traffic’s behavior report. So, if you want to exclude WordPress admin page views traffic from Google Analytics then here is the solution tutorial.

I was also irritated when I get my own WordPress login script page views in Analytics Google and eagerly want to remove them from traffic report. So, after some searching I got  a way to filter the WordPress admin or login script traffic from Google Analytics and here in this tutorial, I am going to show you, how to setup filters for WordPress admin pages in Analytics Google.



Steps to exclude WordPress Admin Traffic From Google Analytics


  1. Go to your Google Analytics and Login
  2. If you have more than one website then select  your website
  3. Click “Admin” option
  4. Select filter option under view menu
  5. Click on option Add Filter to create a New Filter
  6. You can see int he screenshot View Menu and Add filter Options.

admin-google-analytics view-gogle-analytics

7.  Now it’s time to add Filter to Exclude WpAdmin Pages.  Under the Filter Name, give some name to your filter and in Filter type select a Predefined option. From its subcategory select, exclude->traffic to the subdirectories-> that begin with as shown in the screenshot.

In the Subdirectory write down /wp-admin/.

Google Analytics WordPress admin

This filter means it will exclude all WordPress pages started with wp-admin.

8. Now we are going to create another filter to exclude the wp-login page form Google analytics WordPress website reports. In same way add a new filter and create Filter name, select custom->Exclude->Reequest URI->Filter patter . Under filter, pattern writes down wp-login.php as shown in the screenshot.

Google Analytics -filter

In this way, you can exclude or remove any WordPress pages from google Analytics.



Test Google Analytics WPAdmin Exclude Traffic Filter

After applying the filters, its time to test the filters in Analytics Google reports.

  1. Just got to the Reporting menu
  2. click on behavior option from the left sidebar
  3. Now in new tab logo in your WordPress website
  4. create a demo post and preview it two or three times
  5. Go back to the Google Analytics and refresh the behavior page.

Now you will see there no page views listed from the wp-login or preview pages. This means your filter is working and you can now enjoy the clear picture of your traffic in Google Analytics reports


10 thoughts on “How to Remove WordPress Admin Page Traffic From Google Analytics”

  1. I have been surfing online more than three hours today, yet I never found
    any interesting article like yours. It is pretty worth enough for
    me. In my opinion, if all web owners and bloggers made good content as you did, the net will be much more useful than ever before.

  2. Hi

    I tried it for my blog but after verifying, it says – This filter would not have changed your data. Either the filter configuration is incorrect, or the set of sampled data is too small.

    What could be the issue?

    Also, I’m looking to block all the articles/pages I visit within my WP admin section and directly from home page. Is it possible to do it?

  3. This was a very helpful article to exclude admin user and login page from Analytics tracking. Just what I was looking for. Thanks!

  4. just use “Google Analytics Opt-out Add-on” and after installing use sync so that it’ll be activated for all your devices — pc, mobile, tablet, etc. no sending information to google analytics whatsoever and stop searching more sites for any other answers because I’ve done that and most of them giving you BS

  5. Hello,
    Thanks for your interesting article about how to exclude the admin user in google analytics.

  6. Good article. This is a must for every owner of WordPress websites that wants to utilize analytics data.

    I noticed you not escaping the dot character in the custom filter types, remember that custom filter types use regular expressions, so you should always escape the dot (“.”) character so it’s interpreted literally, like so: “/wp-login.php”.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.