WordPress Plugin to Remove Google AdSense and Google Analytics

If you work on your blog a lot, you’re likely generating unwanted Google AdSense and Google Analytics impressions. There are a number of tutorials out there that show you how to prevent AdSense ads from displaying if you’re logged into WordPress. However, these involve modifying template files which can be a nuisance and time consuming. Ergo the Google AdSense and Google Analytics Remover plugin for WordPress.

I recently updated my WordPress template, which involved a lot of loading and reloading pages. Unfortunately this was resulting in my Google AdSense advertisements displaying more impressions than I would have liked, not to mention I was also triggering unwanted page views in Google Analytics. Rather than place special code in my template to stop AdSense and Google Analytics from loading, I decided to go about writing a plugin to permanently fix the problem.

Plugin Features

  • Plugin only affects the display of pages when users are logged into WordPress
  • AdSense ads are not displayed, preventing blog users from generating ad impressions when viewing blog pages
  • AdSense ads are replaced with placeholders with the proper dimensions
  • Google Analytics code is removed, preventing you from generating statistics
  • Plugin should work whether AdSense and Analytics are loaded via plugins or with the WordPress template
  • Given the simplicity of the plugin and its purpose, there are no plugin options

All you have to do is download, install, activate, and enjoy.

Download the Google AdSense and Google Analytics Remover WordPress Plugin

Here is what my blog looked like when I installed and activated my plugin:

About GeekLad

Geeklad is a technology enthusiast and programming hobbyist. Occasionally he will put together useful little bits of code (be it JavaScript or PHP) and share them with the world. He also enjoys creating and sharing howtos, describing how to do the things people want to do with their computers.
Tagged , , . Bookmark the permalink.
  • Pingback: WordPress Plugin Releases for 2/7 « Weblog Tools Collection

  • Pingback: WordPress Plugin Releases for 2/7

  • Pingback: 海扑科技 » Blog Archive » 2月7日发布的WORDPRESS插件

  • Westchester Webmaker

    Hello,

    Does the plugin remove adsense and analytics for all users or just the admin?

  • http://geeklad.com GeekLad

    All users. If you have a blog where you allow other users to log in, those logged in users will see the placeholders as well.

  • John Mann

    I really believe you will do much better in the future I
    appreciate everything you have added to my knowledge base.Admiring the time and
    effort you put into your blog and detailed information you offer!

    free
    cell phone

  • http://www.webstatsart.com/ Webstats Art
  • Pingback: WordPress Plugin Releases for 2/7 | Wordpress Themes

  • Pingback: Google AdSense and Google Analytics Remover | Best Plugins - wordpress – widgets – plugin 2012

  • ExplorationTravMag

    What if I am logged in (I stay logged into the admin section a great deal in order to check stats) but not editing or creating any posts?

    Also, the problem I’m having is there are usually posts in the draft stage because they are set to publish on a certain day at a certain time.  Google Adsense is seeing that “temp post” and giving me bounces on Adsense.  Will your software fix that, thus assuring Google won’t kick me from the program?

  • Pingback: Websites with Google Analytics - FX Web Design Perth

  • Neil Adams

    Is there anyway to make it only show Placeholders for Admin’s, and users still able to see ads

    For example “User Role Editor” to edit capability of a specific group of users (Subscribers)

  • Neil Adams

    Yes it would fix that, however from what I can see it will also block ads for anyone that has registered to your site. I’m enquiring to see if there is a fix for that

  • http://www.facebook.com/lucia.licastro Lucia Licastro

    GeekLad You simply Smart and very very professional, thank you, thank you, thank you, thank you, 5 Stars

  • Nadia Bracken

    I just installed your plugin. I have been logged in as an editor and doing lots of tweaks to the design of my site. I hope this will slow down some of the false-traffic I have been generating in Google Analytics. Down the line I have considered allowing subscriptions to the site and member’s only content. If I go that route, I am concerned that your plugin will block ads and stats for my registered users. Hope you will consider an update to let us filter the functionality dependent on role. Looking forward to using it either way. Thanks!

  • http://www.comerisparmio.net/ Diego Pastore

    Some time ago, Google updated adsense, introducing asyncronous code; and, in this case plugin doesn’t work, because regexp doesn’t match new adsense asyncronous code, I think.
    Can you help me modify plugin, so it can match new asyncronous code, too?