![]() |
||||
|
||||
|
« How Does a Credit Card Transaction Get Processed? | Still working on the BBCodes... » |
Testing AdSense on a web page - the right way
by: JdS - May 07, 2005
When I began testing and designing the layout of the web pages here at www.gidnetwork.com, I wanted to preview different AdSense ad units on the various layouts, especially the wider ad formats I have not used anywhere else on my existing web sites. I was particularly interested in the Medium Rectangle (300 x 250) ad format since it's also one of the few formats through which image ads are also available. I searched the Net for information on how to do this the right way - I found nothing useful. Searched the Google AdSense Programme Policies and found this little note telling me what I already knew:
Since we cannot display AdSense ads on web pages that are "under construction" or as yet incomplete, I was seriously contemplating creating fake AdSense-y type banners in the various sizes that I was interested to view on my test layouts... Somehow, that didn't sound like a really good idea at the time and I forced myself to write a little email to the AdSense Support Team. What a good idea that turned out to be - they replied (in their usual prompt manner) with a really simple solution to my problem. Regular AdSense Code ExampleTo test AdSense ads on your pages, all you have to do is insert one line in the regular AdSense javascript code! Let's say your AdSense code generally looks like this: Generic Code Example: <script type="text/javascript"><!-- google_ad_client = "pub-0000000000000000"; google_alternate_color = "ffffff"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_ad_type = "text_image"; google_ad_channel ="0000000000"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> ADD: google_adtestThe first step is to add a line to that code, we will add the google_adtest variable to the code: Generic Code Example: google_adtest = "on"; AdSense Code for TESTINGSo there you have it, AdSense code for you to test your web designs and test layouts! Once you've made the necessary changes your test AdSense ad code may look a lot like this: Generic Code Example: <script type="text/javascript"><!-- google_adtest = "on"; // new line google_ad_client = "pub-0000000000000000"; google_alternate_color = "ffffff"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_ad_type = "text_image"; google_ad_channel = "0000000000"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> I must admit that this information spawned quite a few new and useful ideas. I'll post details in a future post perhaps...
|
GIDNetwork Sites
Archives
Recent GIDBlog Posts
Recent GIDForums Posts
Contact Us
|
« How Does a Credit Card Transaction Get Processed? | Still working on the BBCodes... » |