Help Center Ad Tools

Ad Blocker Detection

Ad blockers, like AdBlock or AdBlockPlus, works with a block list of URLs and patterns. By knowing how they work, you can implement a check to determine ad block status and handle users who block advertising on your site accordingly. To detect ad blocking, you can use this code on your page:
<script src="//g.adspeed.net/ad.php?do=detectadblocker" type="text/javascript"></script>
<script type="text/javascript">
  window.addEventListener('load', function () {
    if (document.getElementById('My-AdServer')) { 
      alert('Good! Ads NOT Blocked'); 
    } else { 
      alert('Bad! Ads BLOCKED'); 
      // do something since this viewer is not seeing ads on your site
      // eg: if you want to redirect to your advertising/ad-supported notice page
      // window.location = "https://example.com/?NoticeAdvertising";
    }
  });
</script>
You should change the default behavior, which opens a message dialog, to a suitable action. You can show a message, redirect to a notice/entrant page or log the response to find out how big of an impact from ad blockers on your site and advertising revenue.

Other Articles in Ad Tools

Tools that can help ad operations, ad serving, and ad management tasks easier and quicker

Cannot find an answer for your question? Ask our Customer Care team

Related