Quantcast
Channel: Web Junkies
Viewing all articles
Browse latest Browse all 3220

The most efficient way to deal with Ad Block users if you're an Ads Publisher

$
0
0
If you're a blogger who relies mainly on platforms like Adsense, then one of your biggest problem are those ad blocking software such as AdBlock and Ghostery. These software will hide the ads on your page which results to lost of revenue.

So how do you deal with users who are using ad block softwares?

There are couple of ways to deal with ad block users. You can redirect them to other pages (similar to what they have search) of your blog. The script can be seen below.
You can place the above code to where your ads are located. Commonly this is place right after the <body> tag. Just replace http://disney.com with your own URL.

If you don't like redirection, then you can ask users to whitelist your blog and allow it to show ads. However, it's quite hard to encourage users who don't want to see ads, disable their ad blocking software. In fact, that's quite impossible.

Also in general, the methods mentioned above are really annoying for users. Just imagine you searching for a keyword and you land on a page and then, you'll be redirected to another page. Also, putting scripts and messages on your blog saying and begging to allows ads to show up in your blog is annoying also. These methods can irritate viewers and you could possible drove away potential loyal readers of your blog.

So is there any other way to deal with adblock users?
There is a way and that is to convert those adblock users to potential loyal readers. 

How to do it?

Open your web page that contains Google AdSense ads and copy-paste the snippet you see below before the closing </body> tag. The script looks for the first AdSense ad unit on your page and if it is found to be empty (because the ads are being blocked), an alternative HTML message is displayed in the available ad space.
<script>
 
  // Run after all the page elements have loaded
  window.onload = function(){
 
    // This will take care of asynchronous Google ads
    setTimeout(function() {
     
      // We are targeting the first banner ad of AdSense
      var ad = document.querySelector("ins.adsbygoogle");
     
      // If the ad contains no innerHTML, ad blockers are at work
      if (ad && ad.innerHTML.replace(/\s/g, "").length == 0) {
       
        // Since ad blocks hide ads using CSS too
        ad.style.cssText = 'display:block !important';
       
        // You can put any text, image or even IFRAME tags here
        ad.innerHTML = 'Your custom HTML messages goes here';
     
      }
     
    }, 2000); // The ad blocker check is performed 2 seconds after the page load
  };
</script>
You can put a Facebook Like box, a YouTube video, a Twitter widget, an image banner, a site search box or even plain text.

Important Notes: The above snippet only detects blocking of AdSense ads and replaces them with alternate content. However, the process is more likely the same for other ad serving platforms.

Viewing all articles
Browse latest Browse all 3220

Trending Articles