[How-To] Disable Adsene Ads from Showing Up for Logged In Users in WordPress

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
}

Adsense Earnings

Image: Adsense Earnings

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.

Via

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.

Advertisements

[How-To] Restrict your Adsense Publisher ID from being used by Porn Websites

As a Adsense publisher you need to adhere to a Adsense Usage Policy. One such policy included within is about not showing your Adsense Ads in websites which include Porn or violent content. However, even though you might not have any intentions of showing ads in such websites, its possibe that your Adsense Publisher ID gets used by tricksters for showing Adsense Ads in such websites. This though, wont give any straight benefit to the website publisher, but it can cause serious damage to your Adsense Profile, in worse case, can even lead to suspension of your Adsense Account.

If you are wondering how can your Publisher ID be exposed to the outer world, well, the answer is very simple and straight. All someone has to do is view the source of the webpage where you are showing Adsense Ads to get your publisher ID. Later, any trickster can simply use the same Publisher ID for showing ads. 

This post describes a step by step process of protecting your Adsense Publisher ID from being used by such tricksters. In order to protect your account, follow the steps below.

1.) Login to your Adsense Account.

2.) Click on the tab called “Adsense Setup”.

Setting up allowed sites for showing ads against your publisher id in adsense

Image:Setting up allowed sites for showing ads against your publisher id in adsense

3.) Once inside Adsense Setup. Click on the menu tab which says “Allowed Sites”.

4.) Here you need to choose your site settings. Here you have two options of either allowing any site to show up your ad or allow only certain sites to show up ads for your account.

Update the list of websites for which you wish to show the ads and get them recorded.

Image:Update the list of websites for which you wish to show the ads and get them recorded.

5.) Select the second option and in the text area below, enter the names of the websites or specific url’s where you would like your ads to be shown. Click on Save Changes once done. If you put your ad code on a page not on this list, ads will still show, but impressions and clicks will not be recorded.

That’s it. You just secured your Adsense Publisher ID from being used by someone else. Even if they do use it, it wont have any impact on your Adsense Earnings.

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.