Those who use adsense would understand that it requires a lot of testing and retesting before arriving at that perfect layout for your ads. This testing might lead to a lot of unwanted impressions (that are against adsense TOS). Here are the two ways, I test my adsense ads without fear of invalid/excess impressions.
1) Use images exactly of the same size of the ad you are going to use. Pick the adsense images here.
2) Many a times you might want to check the layout rendered after the actual javascript is executed. Add a parameter google_adtest = “on”; to your adsense code and place it where you want to intend to put the actual code. For ex: If your adsense code is-
<script type="text/javascript"><!-- google_ad_client = "pub-****************"; /* 200x200, created 08/08/08 */ google_ad_slot = "12345678"; google_ad_width = 200; google_ad_height = 200; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
The code after adding the parameter would become-
<script type="text/javascript"><!-- google_ad_client = "pub-****************"; /* 200x200, created 08/08/08 */ google_ad_slot = "12345678"; google_ad_width = 200; google_ad_height = 200; google_adtest = "on"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
With google_adtest=”on” , though you will see the ads related to your content, no impression or ad click will be added to your account and hence you are safe. I guess you must be wondering that Google adsense TOS does not allow any change of code then how come I am doing it. I have verified this from the Google Adsense team and they are ok with it.
NB: For one of my blogs hosted on blogger, I have created a dummy blog. All testing related to new layouts, ads etc is done on this dummy blog.
This post is dated but it’s the second result when searching for “adsense test”. The parameter google_adtest is irrelevant for the new ad unit code. I solved my problem of testing without generating invalid impressions by making googlesyndication.com point to my own webserver (via hosts file) and making the “show_ads.js” script output random text formatted like the real ads and periodically image placeholders.
It’s true Google won’t bother about sparse impressions, but sometimes you need to do heavy tests with layouts and templates and it’s good to have something closest to the real ads when doing these tests.
Ummm you can view you’re ads without the fear of generating invalid impressions…google is smarter than you think…a look at the adsense beginners guide on the google site itself should help you out. Its invalid clicks that Google really cares about.
If you think about it…how is a blog owner supposed to interact with his commentors with the fear of invalid impressions?…Are you telling me he is going to change the code anytime some one comments so that he can reply them?
So though you were trying to be helpful, I hope this article hasn’t caused too much panic amongst publishers of the possibility of invalid impressions…they will only flag you maybe once you reach like a 1000 impressions a day from your IP.
@Nash: You’re correct but there were a lot of insecurities in people’s mind then about invalid impressions (this post is dated as you can see from the time stamp) Also, the parameter google_adtest has been provided directly by Google. There must be some reason for it right?
As far as the commenting is concerned I would normally reply from within my WP dashboard and hence there is no question of generating false impressions.
Can I place the following code in my blogger feed footer. Please help me!.
Hello! I do regularly visit your Blog cause i like it so much.
Can you please help me with my blogger blog
1 when i signed in for Adsense everything was OK but they later sent a mail that scripting of the page was wrong something like that
2 when I tried to move the elements of right side bar to left side bar it indicating error like yqurjh which is so unbearable.
please help me……..
[email protected]