Prevent Adsense from Click Bombing using Vanilla JavaScript - Cookie Based

Prevent Adsense from Click Bombing using Vanilla JavaScript - Cookie Based
Hello, Bloggers! Welcome to Fineshop Design. If you have an Adsense approved site, you might have faced the issues of Ad-limits due to invalid clicks. Adsense may restrict showing Ads on your site for a limited time. If you want to control clicks on Adsense by your visitors, you should try the codes I am going to share today. How does it work? Basically, we will set Cookies in visitors' browser with value based on how may times they have clicked on Ads. Let's understand with an example. Suppose you have set 3 maximum clicks. Whenever, he/she will click on Ads, a cookie with desired key (i.e. "MAX_CLICKS") with value based on the clicks will set in their browsers, and the value will increment 1 after every click. So, when they will have reached the limit (i.e. 3 times) and again clicks on the Ads, the ads will disappear. Now, they will not see any Ads for a time, you set. Clearing cookies will still allow users to click on Ads. So, it will not totally prevent from Click Bo…

About the author

~ Hello World!

4 comments

  1. Darshan Gowda
    from next upload minified js sor
    1. Deo K.
      You can use any minification tool for it 🫣.
  2. Test-Lab
    not working , malipal time click for testing your website.
    you are useing this code in your website . tell me
    1. Deo K.
      No, currently I am not using it. For testing there is a 'Demo' link button.