1

I'm coding a function to detect if users are using adblockers. When I detect it I send it to Site Catalyst (Omniture).

The problem is: Some adblockers use a black list to block requests and my company catalyst url it's in one of these lists. When I look in the devtools they block the requests and show a ERR_BLOCKED_BY_CLIENT. There's a way to check if a request was blocked by client using javascript?

1 Answers1

0

Detecting ad blocker is easy check this answer it might be helpful How to detect ad blocking and show a message

You can check this out it might help detect-adblocker

Its an implementation of timing answer

Add this before any script in the head tag:

<head>
    <title></title>
    <meta/>

    <!--adBlocker detection code - START-->
    <script src="//adblocker.fortiapp.com/ads.js"></script>
    <script>
        (function (i, o, g, r) {
            i[o] = (typeof i[o] == typeof undefined) ? g : r
        })(window, 'adblocker', true, false);
    </script>
    <!--adBlocker detection code - END-->

    // Other scripts

</head>

Then later use it:

if (adblocker) {
    // the add blocker is enabled
}else{
    // ad blocker is not enabled
}
Community
  • 1
  • 1
Mustafa Dwaikat
  • 3,392
  • 9
  • 27
  • 41