Adsense Click Fraud Protection

I am Using self-hosted Ghost CMS “3.3.0” & Casper Theme.

I’ve been trying to add a Method on My blog so that the Adsense “Ad Block” disappears if the User Clicks.

And it should stop showing Ads for 24h fo that specific User!

to achieve that, I am using javascript with the help of Cookies to stop showing ads based on the cookies name registered on the user Browser

Where should I place the script exactly for that to work Properly