Join Our Facebook Page Join Here!

How to Install Anti-Adblock Script in Blogger

How to Install Anti-Adblock Script in Blogger

How to Install Anti-Adblock Script in Blogger

Hello friends, welcome to Gadgets Tech 18. Today I will tell you how you can add anti adblocker to your blogger website. Installing an anti adblocker on your website is essential if you want to maximize your security and earnings.

What is AdBlocker?

What is Adblocker? An adblocker is a script or application that blocks advertisements from loading on websites. People use adblockers so that advertisements are no longer loaded on internet sites and net consumption is reduced so that websites become hundreds of times faster.

Some useful adblockers

Here is a list of adblockers that most users use on their devices.

  • Adguard
  • Adblocker Ultimat
  • AdBlock
  • Brave Browser for PC & Mobile
  • How do adblockers affect website owners?

    Although a consumer uses an adblocker to prevent ads from loading in the browser, this reduces the income of Internet site owners. If the website advertises on its internet site for its revenue and the user uses an adblocker then the ads will not load and the website owner will not get impressions and clicks on the ads. It is very painful when a writer works very hard to present content to his clients and gets nothing when he returns. That's why website owners use anti adblocker on their website so that users use adblocker and lose their earnings. If you use AdSense on your blog, you already know that it can pay you for ad impressions and clicks. Let's say someone uses the AdBlocker Chrome extension. In that case, those ads will be blocked from loading on that web page As a result, no ads can be displayed to customers and you can no longer profit from their visits.

    How to Add Anti Adblocker Script to Blogger Website?

    Let's see how you can add anti adblocker script to blogger website. The best way to install anti adblock script on blogger is to follow and do the steps given below.

    Scroll down to the bottom and get the code for Anti Adblock Script

    Instructions for implementing the code are provided in the downloaded file.

  • Go to Blogger Dashboard
  • Then go to Theme > Edit HTML
  • And Follow the below instructions
  • Get Anti Adblocker script code on Blogger website

    1.Add this CSS first </style>

    .popSc{position:fixed;z-index:99999;top:0;bottom:0;left:0;right:0;padding:20px;background:#f3f5fe;display:flex;justify-content:center;align-items:center}
    .popSc.hidden{display:none}
    .popSc .popBo{position:relative;background:#fff;max-width:400px;display:flex;justify-content:center;align-items:center;flex-direction:column;padding:30px;border-radius:30px}
    .popSc .popBo svg{display:block;width:50px;height:50px;fill:none !important;stroke:#08102b;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5}
    .popSc .popBo h2{margin:10px 0 15px 0;font-size:1.2rem;font-weight:800;color:#08102b}
    .popSc .popBo p{margin:0;line-height:1.7em;font-size:0.9rem;color:#08102b}
    .darkMode .popSc{background:#1f1f1f}
    .darkMode .popSc .popBo{background:#2c2d31}
    .darkMode .popSc .popBo svg{stroke:#fefefe}
    .darkMode .popSc .popBo p, .darkMode .popSc .popBo  h2{color:#fefefe}
    	

    2.Add this HTML before</body>

        	<div class='popSc hidden' id='antiAdBlock'>
      <div class='popBo'>
        <svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><circle cx='12' cy='12' r='10'/><line x1='12' x2='12' y1='8' y2='12'/><line x1='12' x2='12.01' y1='16' y2='16'/></svg>
        <h2>Ad-Blocker Detected!</h2>
        <p>Sorry, we detected that you have activated Ad-Blocker.<br/>Please consider supporting us by disabling your Ad-Blocker, it helps us in developing this Website.<br/>Thank you!</p>
      </div>
    </div>
    	

    3.Add this JS just after the above HTML

        	<script>/*<![CDATA[*/ /* Anti Ad-Blocker Script by Fineshop (Lazyload) */ var lazyAnti=!1;window.addEventListener("scroll",function(){(0!=document.documentElement.scrollTop&&!1===lazyAnti||0!=document.body.scrollTop&&!1===lazyAnti)&&(!function(){var antiAdBlock=document.querySelector("#antiAdBlock");var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";e.onerror=function(){if(antiAdBlock!=null){antiAdBlock.classList.remove("hidden");window.lazyAnti=!0}};var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}(),lazyAnti=!0)},!0); /*]]>*/</script>
    	

    Post a Comment

    Cookie Consent
    We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
    Oops!
    It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
    AdBlock Detected!
    We have detected that you are using adblocking plugin in your browser.
    The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
    Site is Blocked
    Sorry! This site is not available in your country.