Overriding the default Adsense setting in Google Ad Manager

by Kishore on June 11, 2008

I got an invitation for Google Admanager few days back and was just going through the features before using it. I had tough time working on the the default Google Adsense settings. Google Admanager has a feature of showing Google Adsense ads if you have linked one for the slots which are free or even compete with the booked ads. Right now the user does not have the feature to modify the Adsense attributes like the link color or the border color as we can do for individual ads in Google Adsense control panel. But we can do it by using from Javascript provided on the help page of Google Ad Manager.

As per the information given on the help page is added the code, but was not working. You can see the code info below

image

According to the help page as you see above, I inserted the code as given below

  //page level
  GA_googleAdAdSensePageAttr("google_color_link", "CC0000");
 
GA_googleAdAdSensePageAttr("google_ad_type", "text");
 
//slot level
  GA_googleAdAdSenseSlotAttr("kishoreasokan_Homepage_336x280", "google_ad_type", "text");
 
GA_googleAdAdSenseSlotAttr("Kishore_Asokan_Below_Content_336x280", "google_ad_type", "text");
 
GA_googleAddAdSenseSlotAttr("KishoreAsokan_Post_page_250x250", "google_ad_type", "image");

But this was not working, and spend a lot of time and even posted a help request at Google Groups for Ad manager

Later I was going through some some other help pages for tagging, I came across this information about tagging and in that the attribute is GA_googleAddAdSenseSlotAttr instead of GA_googleAdAdSenseSlotAttr and when I corrected the code according to this it is working fine.

  //page level
  GA_googleAddAdSensePageAttr("google_color_link", "CC0000");
 
GA_googleAddAdSensePageAttr("google_ad_type", "text");
 
//slot level
  //GA_googleAdAdSenseSlotAttr("kishoreasokan_Homepage_336x280", "google_ad_type", "text");
  //GA_googleAdAdSenseSlotAttr("Kishore_Asokan_Below_Content_336x280", "google_ad_type", "text");
  GA_googleAddAdSenseSlotAttr("KishoreAsokan_Post_page_250x250", "google_ad_type", "image");

Now let me explain you how to  use the attributes to override the default adsense settings. When you login to the Ad Manager and go to the inventory tab, you can find the Default Adsense setting link. In this you can set your default adsense properties, but there is no option to set properties for individual solts or placements adsense properties.

image

But you can override the default adsense properties in the Ad Manager in two levels

  1. Page Level
  2. Slot Level

For setting the page level properties, you have to add the following code to change the property which will be applicable on a page level basis, all the slots will be effected

GA_googleAddAdSensePageAttr("param", "value");
 
and for Slot level modification you need to add
GA_googleAddAdSenseSlotAttr("slotname", "param", "value");
 

What are the properties that you can override?

    • Border: param = google_color_border
    • Title: param = google_color_link
    • Background: param = google_color_bg
    • Text: param = google_color_text
    • URL: param = google_color_url
    • Alternate ad URL: param = google_alternate_ad_url
    • Ad unit (text, image, text/image): param = google_ad_type
    • Corner style: pa
      ram = google_ui_features

    Now its working great. Google Help centre needs to correct the information given on their help page

    1. How to get your google adsense account banned : Stupid question, but its very simple,...
    2. Google Says NO to Google Adsense Ad Blending : I had done a post related...
    3. Google Ad Manager Launched through Invitation : Google has launched Ad manager, which...
    4. Is revenue sharing allowed with Google Adsense Program : Few months back, I wanted to...
    5. Blending Google Adsense to your blog : After doing some changes on the...
    • http://asokans.com Kishore

      Now you do not need to do this, you can set the properties for individual slots from the Google Ad Manager itself