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 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.
Here is what my blog looked like when I installed and activated my plugin: