By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
BlogbeastBlogbeast
  • Adsense
  • Blogger
  • WordPress
  • Social Media
  • SEO
  • Tips
  • Offbeat
BlogbeastBlogbeast
Search
  • Adsense
  • Blogger
  • WordPress
  • Social Media
  • SEO
  • Tips
  • Offbeat
© 2026 Blogbeast. All rights reserved.
AdsenseBlogger

How to Add Links To Detect Adblock On Blogger Blog Using JavaScript

Last updated: 27/08/2022 6:02 PM
By admin

How to Add Links to Detect Adblock with JavaScript – If you want to know whether visitors on your blog blocking Google AdSense ads or not, you can do so by adding a JavaScript code.

This JavaScript automatically detects if any of your site visitor using an Adblock extension enabled browser, Then it brings a special message to your blog visitor. This JavaScript code supports the new format of the data Asynchronous Responsive Google Adsense ads.

The code is also quite light, so you do not have to worry if the code is going to weigh on the loading speed of your blog. For those who want to try please follow these steps:

Login to Blogger> Open Template Editor> Then add the following code before </ body>

<script type='text/javascript'>
//<![CDATA[
// Adblock Detected
window.onload=function(){setTimeout(function(){var e=document.querySelector("ins.adsbygoogle");e&&0==e.innerHTML.replace(/s/g,"").length&&(e.style.cssText="color:rgba(0,0,0,0.5);font-weight:700;font-size:110%;padding:20px;margin:auto;text-align:center;text-decoration:none;display:block!important;background:rgba(0,0,0,0.02);border:1px solid rgba(0,0,0,0.08)",e.innerHTML="It seems that you block Google AdSense ads on your browser")},2e3)};
//]]>
</script>

There are two highlighted codes, one is the CSS of the Displaying message and the second one is the displaying message. You can modify these two codes according to your taste.

Save your template, then check your blog after enabling an Adblock extension to your browser and ensure that the code is going well.

Read More

Difference between Blogger and WordPress | Best blogging platform in 2022
How to add Google In-Feed Ads in blogger – Easy method
How to Divide Post into Pages in Blogspot Blog With Refresh Function
7 Things To Be Avoided To Keep Google Adsense Safe
How to create a free blog on Blogger in 2022 – Blogging tutorial for beginners
Share This Article
Facebook Email Print
YoutubeSubscribe

Popular Posts

What is blogging and how to make money from it?
Offbeat

What is blogging and how to make money from it?

How To Make Money from Blogging
Monetization

8 Fastest ways on How To Make Money from Blogging

What is wordpress plugin
Wordpress

20 Best WordPress Plugins for your Websites in 2022

How to Uninstall Wordpress Plugins manually
Wordpress

How to Uninstall WordPress Plugins completely with Shortcode

What is wordpress plugin
Wordpress

What is wordpress plugin ? How to install WordPress plugin in 4 easy methods?

You Might Also Like

Blogger

How To Create a Material Design Dialog Box On Blogspot Blogger

By admin
18/08/2019
BloggerWidgets

How to Add Simple Stylish Recent Posts Widget For Blogger

By admin
01/02/2022
BloggerWidgets

How to add Facebook Page like box on your blog – Blogger tips for beginners

By admin
17/09/2019
How to make a BioLink for Instagram in Blogger
Blogger

How to make a Biolink for Instagram on Blogger

By admin
05/09/2022
BloggerSEO

How To Setup Custom Robots Header Tags In Blogger 2022

By admin
01/02/2022
BloggerJavascriptWidgets

How to add Simple Random Post Widget For Blogger

By admin
01/02/2022
Blogbeast

Welcome to BlogBeast, the place where blogging meets earning,and ideas turn into something big.

Quick Links

  • About
  • Contact Us
  • Subscribe

Useful Links

  • Disclaimer
  • Privacy Policy
  • Sitemap
© 2026 Blogbeast. All rights reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?