If you are a new user and you use any form of advertisement blocking (e.g. AdBlock) on your browser, you would have been greeted with a neat little message saying “Doh! It appears that you are using AdBlock software…”.
The purpose of this post is to show you how to create such a message for your own website. I had this idea from a comment I found on one of my favorite blogs (Webmaster Source) regarding combating AdBlock.
Before I go on, let me say that I am not interested in discussing/debating the use and ethics of AdBlock software in depth in this post. I’m planning on writing a post with my research and data on the effects of discouraging AdBlock use in a later post, so let’s save that discussion for another time. For now I would like you to evaluate the pros and cons of this mod and decide for yourself if you would like to install the mod or not.
I have created a WordPress plugin to do this. Just activate and go. Check it out here, Anti-AdBlock WordPress Plugin.
- Makes your visitors aware that your website is funded by advertisements.
- Visitors are encouraged to turn off their AdBlock software for your website.
- It does not guarantee that the visitor will disable AdBlock on your site.
- Insert the following tag into your theme. This div block will be populated with the AdBlock message when AdBlock usage is detected. For my WordPress installation, I placed it just above my main content div block in header.php.
<div id="content_adblock_message" style="display:none"></div>
- Download the following bait banner and put it into a directory called “ad” on your server. For example,
- Refer to the “bait banner” image anywhere in your theme. Make sure your set the IMG ‘id=”banner”‘. For example:
- Open onload.js to modify the message if necessary.
- Refer to jQuery library and onload.js, by add the following lines into your footer.
- Try visiting your site with AdBlock on. You should see the AdBlock message.
- Disable AdBlock and refresh the page. You should not see the AdBlock message.
I’ve already received a request from one person that I should package this into a plugin. Would anybody else like to request this? The more number of requests makes it higher priority on my to-do list :).