Find How Many Visitors Are Not Seeing Ads on your Blog/Website

Do you know there are more than 5% of visitors are not seeing ads on your blog or website and how to track them? Let’s find out how to find AdBlock Users to your blog or website with Google Analytics.

Most of the publisher and content marketer make their most of the revenue through online advertisement. However, there is very popular software which becoming a huge threat to the web businesses and that software is called AdBlock.

There are up to 5% of website visitors are now using this software to remove the ‘clutter’ from day-to-day browsing. This is very bad news for those sites which are heavily relying on this form of marketing.

This is where keeping track on how many people or visitors are blocking your ads with this AdBlock browser extension. If you are interested to know how many people are visiting your site are blocking AdSense and other ads, here with this article, I will share a simple but effective trick.

Track Adblock Users with Google Analytics

Track Users Google Analytics

To do so, first of open your site template where you need to put one code which I am going show but be sure put that code before closing body. I also recommend taking backup of the file before you make any changes.

Now install copy and paste below script before </body> tag.

<script> 
  
  window.onload = function() { 
  
    // Delay to allow the async Google Ads to load
    setTimeout(function() { 
      
      // Get the first AdSense ad unit on the page
      var ad = document.querySelector("ins.adsbygoogle");
      
      // If the ads are not loaded, track the event
      if (ad && ad.innerHTML.replace(/\s/g, "").length == 0) {
 
        if (typeof ga !== 'undefined') {
 
            // Log an event in Universal Analytics
            // but without affecting overall bounce rate
            ga('send', 'event', 'Adblock', 'Yes', {'nonInteraction': 1}); 
 
        } else if (typeof _gaq !== 'undefined') {
 
            // Log a non-interactive event in old Google Analytics
            _gaq.push(['_trackEvent', 'Adblock', 'Yes', undefined, undefined, true]);
 
        }
      }
    }, 2000); // Run ad block detection 2 seconds after page load
  }; 
  
</script>

Once you added this code to your website template, this code will work for both University and the older version of Google Analytics tracker which used the _gaq object.

However, as a publisher and a content marketer rather than just earning from ads you should serve your audience something which provides useful to them.

One caveat, this snippet doesn’t work if the users are using browser extensions like UBlock, NoScript, and Ghostery. Because these days, all these adblocking tools are growing fast. These tools aren’t always used to block only ads, but also analytics software is sometimes blocked. Don’t worry I will cover this topic in future.

Any question?
Ask here, and I will get back to it very soon.

  • Hi Dhvanesh,
    This is really nice post. I was not aware about this trick, but i am sure your code will solve this. I am going to try your code on my money site. Let’s see what is result.

    Thanks a lot and keep sharing useful information for Bloggers.

  • awesome writing. Hope to visit your site again 🙂