Old Google AdSense Code Reference Home

Old Google AdSense Code Reference
Both text ads, image ads, video ads, and link units use the similar ad code format as shown on picture.

Available Customization Options Using JavaScript Variables

The ad code above should be customized and changed by using different value for JavaScript variables to reflect the AdSense ad unit prefer, here’s the brief description of each variables in the ad code.

google_ad_client – The publisher ID that is required and must be correct to get paid and earn revenue from Google AdSense program when eligible clicks or page views occurred.. The publisher ID can be retrieved from Google AdSense account.

google_ad_width, google_ad_height, google_ad_format – Define the size and format of AdSense ad unit to display. All there values should be matching each other, i.e. the first number before ‘x’in google_ad_format is also google_ad_wide, and the second number after ‘x’ before ‘_’ is the google_ad_height. google_ad_height and google_ad_width have no effect on the actual ad size as they only control the object box within which the ad unit is contained. The parameters are used normally to maintain a consistent layout presentation when the page layout provides an area that is wider than the ad unit itself. Google provides 24 different ad formats (12 ad units and 12 link units) for web page placement.

Normal Ad Unit:
728×90_as (Leaderboard)
468×60_as (Banner)
234×60_as (Half Banner)
125×125_as (Button)
120×600_as (Skyscraper)
160×600_as (Wide Skyscraper)
180×150_as (Small Rectangle)
120×240_as (Vertical Banner)
200×200_as (Small Square)
250×250_as (Square)
300×250_as (Rectangle)
336×280_as (Large Rectangle)

Link Unit:
120x90_0ads_al (4 links)
120x90_0ads_al_s (5 links)
160x90_0ads_al (4 links)
160x90_0ads_al_s (5 links)
180x90_0ads_al (4 links)
180x90_0ads_al_s (5 links)
200x90_0ads_al (4 links)
200x90_0ads_al_s (5 links)
468x15_0ads_al (4 links)
468x15_0ads_al_s (5 links)
728x15_0ads_al (4 links)
728x15_0ads_al_s (5 links)

google_ad_type – Definite if only text ads, images ads or both type of ads is allowed. Note that for Flash based ads and video ads to appear, image ads must be enabled. Available options are:

text – for AdSense text ads only
image – for image ads only, including video ads and Flash ads.
text_image – for text and image ads

google_alternate_ad_url – Display another ads or web pages when Google AdSense program does not have a relevant advertisement for the ad slot. By default, a public service ad is display. Specifying the alternate ad URL will display the content specified in the URL. Note that the alternative ad code should be specified in HTML file, and should not has size that bigger than the Google ad unit, or else the alternative ad will be cut off or trimmed off. It’s also possible to put in an alternate URL which will collapse the ad space (no space been used for the ad).

google_ad_channel – To specify a custom channel (a 10 digits number) to track ad performance and statistics. Channel ID must be created at AdSense account before they can be used.

google_color_border, google_color_bg, google_color_link, google_color_text, google_color_url – Determines the color of the ad border, ad background, ad title of each ad, ad text inside the ad block, and URL at bottom of each ad. Up to 4 separate values (differentiated by commas) can be supplied for automatic color rotation when the ad is served by the Google server. The image ads does not affect by these values. Note that the color value should be converted in hexadecimal format.
Tags: Old Google AdSense Code, How To Do,
Posted by: admin   28 June 2010 17:47

Bookmark and Share

REC at Addit.in

Двери противопожарные и металлические Санкт-Петербург
Comments
Richard Machine
 - 15/08/2011 07:55
Richard Machine

RE(1):Old Google AdSense Code Reference

15/08/2011 07:55
This post is very useful for me, much appreciated! :)
Add Your comments
Name
Email
Site
Comment title
Your comment