How to Detect Invalid Click on Ads in Blogger

How to Detect Invalid Click on Ads in Blogger

Updated on 16 May


If you are facing problem of invalid Clicks on your website or blog then this tutorial will be very much helpful for you. You can handle invalid Clicks on your AdSense ads or any other ad network using the script.

You just have to paste this simple JavaScript code on your website or blog then this script will automatically detect invalid Clicks on your AdSense ads and prevent that user to click again on that ad

Here are different ways to place the script on your website in blogger or in WordPress you can create widgets and place this script inside that visit or simply copy the code below and paste it inside your template code bye going to template editor.

Steps to place invalid click Detector script in blogger:

  1. Go To Blogger Dashboard
  2. Then Go to Theme / Template
  3. Click Edit HTML Button
  4. Now search for </head>
  5. To Search anything in blogger Press Ctrl + F and type or paste the term to search in search bar.
  6. Now Copy and paste the code provided below just above the tag which we have founded in steps 4.
  7. function downloadJSAtOnload(){var e=document.createElement("script");e.src="https://rawcdn.githack.com/softwebtuts/softwebtuts.com/js/antiboomclick.js",document.body.appendChild(e)}window.addEventListener?window.addEventListener("load",downloadJSAtOnload,!1):window.attachEvent?window.attachEvent("onload",downloadJSAtOnload):window.onload=downloadJSAtOnload;
  8. Save Theme/Template.

Conclusion:
You are all done you have just installed invalid click detected script on your blog. Now you don't have take tension about your AdSense Ads invalid click or any tension about termination your AdSense account by Invalid Click.
antiboomclick backup code:
https://thuthuat.github.io/assets/antiboomclick.js
or inline js:
function ASSetCookie(a,b,c){var d=new Date;d.setDate(d.getDate()+c);var e=escape(b)+(0==c?";path=/":"; expires="+d.toUTCString())+";path=/";document.cookie=a+"="+e}function ASGetCookie(a){var b,c,d,e=document.cookie.split(";");for(b=0;b<e.length;b++)if(c=e[b].substr(0,e[b].indexOf("=")),d=e[b].substr(e[b].indexOf("=")+1),c=c.replace(/^\s+|\s+$/g,""),c==a)return unescape(d)}function ASSetCookieAds(a,b){var c=ASGetCookie(a);void 0!=c&&""!=c?(ASTheCookieInt=parseInt(c)+1,ASSetCookie(a,ASTheCookieInt.toString(),0)):ASSetCookie(a,"1",b)}function ASMaxClick(a,b){var c=ASGetCookie(a);return void 0!=c&&parseInt(c)>=b?!0:!1}jQuery(document).ready(function(a){var b="adsShield",c=7,d=3,e=".adsShield",f=!1;ASMaxClick(b,d)&&a(e).hide("fast"),a(e).bind("mouseover",function(){f=!0}).bind("mouseout",function(){f=!1}),a(window).on("beforeunload",function(){f&&(ASMaxClick(b,d)?a(e).hide("fast"):ASSetCookieAds(b,c))})});

0 comments for How to Detect Invalid Click on Ads in Blogger

Cancel