2 Ways to Safely Test Google Adsense Ads on Your Site

As a webmaster you may need to change the layout of your site sometimes. And whenever you change the layout of your site, you’d like to place the adsense ads in such a way that you get maximum CTR, and thus revenue.

To do this, you place the adsense ad unit at different places on your site to find its best position. You also play with the colors of link units and text ads so that it matches with the color of the surrounding elements.

But while doing so, you have to refresh your site many times. And what you don’t realize is that each time you refresh the site, you are sending a request to Google’s ad servers to fetch new ads. Now, since the request is going from the same IP address each time, Google may consider it as a click fraud and may ban you adsense account.

What you should do is to test the ad placements without raising any alarms to Google. Here’s a How-To.

How To Test Adsense Ads on Your Site?

There are two ways to test adsense ads on your site without causing any issues with the adsense policies,

1. Use images instead of actual ads. Just take the screenshot of the ad format you like from the official page and put it on your site instead of the ad.

Its a great way to test the adsense ad units on your site but there’s one issue with this method. You can’t experiment with the colors of link units and text ads easily. To change the color you have to edit the image which is very cumbersome and even impossible if you are not skilled enough with Photoshop, Gimp or MS paint :) If this is the case with you, use the second method to test the ads.

2. Get the code for the adsense ad unit that you want to test. Then put this line,

google_adtest = “on”;

as the first line of the code.

test-adsense-ads-on-your-site

Note that you must put the semicolon(;) at the end of this line.

Once you add this line to the code for the adsense unit, it will be displayed as a test unit and its impressions won’t be counted.

Very Important Note – Once you are satisfied with the adsense unit, don’t forget to remove the line,

google_adtest = “on”;

from its code.

5 thoughts on “2 Ways to Safely Test Google Adsense Ads on Your Site”

  1. google_adtest = “on”; is no longer supported by AdSense so beware of using it as it will surely add invalid impressions and will get your account suspended.

Leave a Comment