So i'm trying to get mouse down events to trigger when people click my ads in my div tag Why? because I have a friend whose adsense account was banned because of invalid clicks. What i'm wanting to do is have it record the IP and once an ad is clicked, all the ads will disappear for about 5 days before appearing again, meaning that they cant continuously click the ads, which results in the adsence account banned.
What I have done to test is this
<script>
function mouseDown() {
alert("Yes");
}
</script>
<p id="myP" onmousedown="mouseDown()">
Does this work?
</p>
This works for when someone clicks the text, and shows the message "Yes". But when I put a ad inside
<div class="myAds" onmousedown="mouseDown()">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:336px;height:280px"
data-ad-client="ca-pub-2948xxxxxxxxx2"
data-ad-slot="6735xxxx36"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
It doesn't work, all it does is go strait to the ad without any alert
can someone help with this issue, or any other work around?