Thursday, January 22, 2015

Creating an Anti AdBlock Plugin for WordPress

In this tutorial, we will create a WordPress plugin that can disable the website for users using AdBlock or display alternative ads to AdBlock users from the same domain as the website.


Adblock Ad on Ted Talks

This plugin can be useful if your website is completely dependent on ads for generating revenue and where users consume a high amount of resources. For example, a video sharing site may want to ban a site from playing videos or display alternative ads for AdBlock installed users. One such example is TED.com, as shown above. You can see TED.com requests you to unblock ads for their site.


How Does AdBlock Work?


AdBlock maintains a list of various advertising network domain names and a list of advertising specific keywords.


AdBlock works by blocking image, iframe, script and Flash HTTP requests that match known advertiser domain or advertiser specific keywords that are on their list. After the requests are blocked, it also changes the CSS properties of the blocked HTHML elements to hide them.


AdBlock allows you to expand on what can be blocked by adding filters.


Continue reading %Creating an Anti AdBlock Plugin for WordPress%




by Narayan Prusty via SitePoint

No comments:

Post a Comment