Ad Blocking

Better Monetisation with Header Bidding

Increase ad revenue by simultaneously collecting multiple bids from a variety of demand sources each time a new impression is available

Ad Blocking

How to Detect Ad Blockers

Adblocking continues to grow globally. According to Statista, the use of ad blocker increased by 24.4%  between 2014 and 2018 in US alone. Users install adblockers to remove ads from their web experience and their numbers are growing every day.

Ad blockers are a nightmare for publishers. But they don’t affect all publishers equally. In order to calculate its effect, publishers need to know whether their visitors are using ad blockers or not. Detecting ad blockers can provide an insight into the revenue they are losing. Once that is known, publishers can work on measures to recover the lost revenue.

So, how can a publisher detect an ad blocker? Is ad blocker detection possible? What anti-ad blocker measures can publishers try? Here are the answers.

How do Ad Blockers Work?

Ad blockers are browser extensions or plugins that are designed to block the ads displayed on webpages. If you, as a user, have installed ad blockers, then you may have noticed blank spaces on certain webpages. These blank spaces are where ads were supposed to display. But now, the adblocker has blocked them and you are seeing blanks.

Adblocker starts working as soon as a page starts loading on the browser. Let’s say a user has an ad blocker installed on his browser. He is surfing the internet and launch a web page containing ads. This is where the job of an ad blocker begins. The ad blocker quickly scans the website for scripts. Then these scripts are compared with a database of ads scripts. If any of the website scripts are matched with the ad scripts, the ad blocker will stop it from being displayed.

Using ad blocker reduces page load time. Adding this to the fact that the user can avoid annoying ads. And you’ll understand how hard it is for publishers to convince users to stop using ad blockers. But publishers can detect ad blockers and try to recover the lost revenue.

How Can Publishers Detect Ad Blockers?

As a publisher, you might be making good money by running ads on your website. But you could make even more if ad blockers weren’t blocking ads. This brings us to the topic—publishers can detect ad blockers. There are a few known applications, plugins and JavaScript codes available, using which a publisher can detect whether ads are being displayed on their site or not.

Anti-ad blockers have a general idea about the webpage with ads: the expected webpage. Once this webpage is loaded on the user’s browser, anti-ad blocker compare the rendered webpage with the expected webpage. If the data doesn’t match, the website displays an anti-ad blocker message. Publishers like Forbes and BusinessInsider are already using anti-ad block methods.

Ad Block Detection Scripts

Anti-ad blocker technology is a business now. There are a lot of providers offering applications, plugins, and scripts for publishers to put on their websites. Many ad-block detection scripts are available online which are easy to implement. Here are a few scripts:

IAB Script

IAB (Interactive Advertising Bureau) is an advertising business organization. Their tech lab has designed an ad block detection script. According to IAB, the script is easy to implement.

You check the IAB GitHub page to access the detect ad-block script. The JavaScript (adblockDetector.js) has been tested on Chrome, Firefox, Internet Explorer and Safari Browser. You can find the installation and implementation details on the GitHub page of the IAB.


DetectAdBlock simplifies the process of ad blocker detection. Here’s how it works:

Step 1: It starts with creating a hidden ‘div’ section to a file called “ads.js” and place it in the root directory of your website.

var e=document.createElement('div');'mnMzPGBywKre';'none';

Step 2: Now it’s time to place the ad block detection code in the HTML source code, just above the </body> tag. The purpose of this code is to detect if “ads.js” exists (ads are allowed) or not (ads are blocked).

<script src=”/ads.js” type=”text/javascript”></script>
<script type=”text/javascript”>
 alert(‘Blocking Ads: No’);
} else {
 alert(‘Blocking Ads: Yes’);

After detection, you can add a message asking to disable ad blocker to access the content.


F**kAdBlock also provides a free ad blocker detection script. Publishers can check out the GitHub page for the code and steps to implement it. The code presented by F**kAdBlock is more formalized. There are function declarations for ad block detection and no ad block detection. And then function definition respectively.

The script works perfectly for AdBlock and AdBlock Plus. Also, it supports multiple web browsers (Chrome, Safari, Firefox, Internet Explorer, and Opera). Here is an example of how to detect ad blockers using the F**kAdBlocker code.

What to do After Ad Blocker is Detected?

MarketingDive reports that around 30% publishers are using some form of anti-ad blocker technology. This means that publishers are aware of this technology and they are ready to take their chance with anti-ad blocking methods.

Publishers such as Forbes and Business Insider display anti-ad blocker messages once they detect ad blockers. In order to access the content, the user needs to disable the ad blocker. And according to data, half of the users agree to disable their ad blocker to view the content.

How to Monetize in the Post-Adblock World

It can be beneficial for some publishers to look for an alternative rather than going for anti-ad block technology. Here are some methods to start with:

Adblock Recovery

Ad reinsertion technology has been in the market for quite some time now. Using this technology, the publisher can recover revenue lost to ad blockers without hurting the user experience. The idea is to serve acceptable ads to browsers actively using an ad blocker. However, ad reinsertion requires your ad tech partners to be whitelisted by the ad blocker creator.

Native Advertising

Native advertising is hard to detect with ad blockers. This is due to the fact that native advertising blends with the webpage and its content. Have you noticed ‘sponsored’ posts on facebook? These are native ads. Many magazines and news platforms are now also opting for native ads. One thing to keep in mind here is, while native ads are hard to detect with ad blockers. But they are not impossible to detect and block.

Offer ‘Ad Free’ Subscriptions

This can be a good idea for publishers with rich content sites. Bloggers in the news and magazine niche have no product to sell, meaning that their content is their product. They make money by displaying ads. If visitors start using ad blocker, they notice a major drop in revenue. In such a case, creating an ‘ad free’ subscription for users can work well. This method is popular with mobile applications where the app publisher pitches the subscription by promising no ads.

Ask Nicely

Requesting users to disable their ad blockers can work. You can explain that display ads are important for your business. Explain your ad policy and reassure the user that you are not going to overwhelm them with loads of ads. In doing so, publishers can hope that their loyal users will disable the ad blocker and allow ads to be displayed on their web page.

Final Takeaways

The user has the right to use any kind of plugin and web extension on their device. And publishers and advertisers should respect that. If you look closely, ad blockers are not the culprit here. Annoying pop-ups, malvertising, redirect ads, and more; are the reasons why users choose to use ad blocker.

Display ads are important for everyone (users, publishers, and advertisers). Blocking ads altogether can make the existence of free information on the web untenable. Publishers can detect ad blockers. But what comes next? Lost revenue is not going to recover itself. Also, the user perceptions that ads are annoying and spammy, is not going to change overnight. In the long term, publishers need to create their ad strategy keeping user experience in mind.

Write A Comment

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