Best way to Install Anti Adblock Script In Blogger
Hello Friends, Welcome back to DracWound Helps. Today on this occasion I am going to explain how you can add Anti AdBlocker to your Blogger Website.
Anti AdBlocker is very necessary to put on your website if you want to protect
and maximize your earnings.
What is an AdBlocker?
AdBlocker is somewhat a type of script or program that stops the Ads to load on the websites. The user uses AdBlocker so that Ads do not load on the website and internet consumption reduces that so websites loads faster.
Some useful AdBlocker
Here is a list of Adblocker which is mostly used by user on their devices.
- Adguard
- Adblocker Ultimate
- AdBlock
- Brave Browser for PC & Mobile
How do AdBlockers affect the website owners?
When a user uses an AdBlocker in the browser to stop the ads to load then it decreases the earnings of website owners. If the website had put ads on his website for his earnings and the user uses adblocker then the ads will not load and the website owner will not get the impressions and clicks on the ads.
This is very painful when a creator does so much hard work to provide content to his users and in return, he does not get anything in return.
That's why website owners use Anti AdBlocker on their website so that users do use Adblockers on their website and kill their earnings.
If you use Adsense on your blog, you already know that it pays you for ad impressions and clicks. If a person uses an adblocker chrome extension, those ads will be prevented from loading on that page. As a result, no ads will be displayed to users, and you will not profit from their visits.
How do Anti AdBlocker works?
Anti Adblocker is a type of script which is put on the website to stop the AdBlocker present in the browser. Anti AdBlocker gets activated when the script finds that AdBlocker is present in the browser.
Anti AdBlocker does not allow the user to access the content present on the website until the user turns off the AdBlocker.
Features of Anti Adblocker Script
There are some useful and interesting features that you should know about this Anti Adblocker Script for Blogger.
Features of Anti Adblocker Script are
- No Content Shifting Problem
- Easy to use
- Will maximize your earnings very much
- No Jquery used
- Made with Pure HTML, CSS, JavaScript
- Stops most of the Adblocker extensions and Scripts
- Interrupts the view of the user with a simple popup
How to add Anti Adblocker Script in Blogger website?
Let's see how you can add Anti AdBlocker Script in Blogger website. The Best way to Install Anti Adblock Script In Blogger is to follow the given below steps and do it.
- Scroll down to the bottom and getthe codes for Anti AdBlocker Script
- Instructions to implement the code are given in the downloaded file.
- Go to Blogger Dashboard
- Then go to Theme > Edit HTML
- And Follow the instructions in the file.
Get the Codes for Anti AdBlocker script in Blogger Website.
Credit for this Anti AdBlocker script goes to Fineshop Design
Take backup of your theme at least twice.
Step 1: Add this css before </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}
Step 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>
Step 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>
Comments
Post a Comment