As a Adsense Publisher, You are strictly not allowed to click on your ads and Google definitely has a way to make out if you clicked on your Ads. The way out to prevent that from happening is by disabling the ads from showing up for any of the logged in users of the website.
In order to ensure that Adsense Ads are not shown to logged in users of your WordPress blog, add the following lines of code into your WordPress theme. Add these lines of code within the theme files referencing Adsense ads.
if (!is_user_logged_in()) {
// Insert your adsense code here
}
The above code makes use of the boolean function is_user_logged_in() which returns true if the user is logged in. The above code insertion into your theme files will ensure that the Adsense Ads are displayed only for user’s which are not logged into the WordPress system.
Therefore in short, after inserting this code, if you are the author of your blog and logged in, you wont get to see the ads.
You can follow me on Twitter at http://twitter.com/vaibhav1981
Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.
Filed under: Wordpress | Tagged: Ad Clicks, Ads, Adsense, blog, Boolean Function, Code Insertion, Google, Lines Of Code, Logged in users, Publisher, Users, Wordpress, Wordpress Theme | Leave a comment »





