Forum Moderators: martinibuster

Message Too Old, No Replies

Google Adsense Innerworking

         

thedealmaker

8:26 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



Hi,
I am thinking of using Adsense for my site. But first, I have a question. I saw the javascript code, the one with showads.js. I saw that google adds a bunch of stuff used as parameters inputed into their javascript showads.js. For examples, google_ad_client, google_ad_height, google_ad_type, etc.

Why do they do that? Why can't they just store these thing into their database? Like the google_ad_client, why can't they just use the website url to find out which client they are? It's not like google can save time from database retrieval just because of these few data, they have to do at least some server retrieval to get those ads and tracking.

There should be a reason, I know that google engineers are not stupid.

Many thanks.

ChadSEO

8:51 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



thedealmaker,

Why do they do that? Obviously only Google engineers would have the answer, but I can think of a few reasons:

  • Allows webmasters to use different ad types, layouts, colors, etc, for different ad blocks on their site, even ad blocks on the same page.
  • Allows savvy webmasters to edit colors, sizes, etc. without the need to login to the Adsense website. This way I could randomly do different ad layouts, or do A/B testing on the same page.
  • For large sites, such as blogs, there may be several different Adsense client IDs in use.

I'm sure there are other reasons as well, those are just a few that I can come up with quickly.

Chad

JJao

9:15 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



I guess there are many reasons... from where I'm sitting, I like the freedom I get to use these parameters in my own (serverside) scripts.
For example, if a user changes from a red to a blue theme, I place the appropriate colors in the javascript, so the ads change the same way. (after writing, now I see Chad mentions this too)

Yes, a Google database could do the same thing, but not as flexible. And from an ITIL point of view, change management is fully in their own hands, without requiring any changes on websites (usually). Impact analysis is more simple. Change impact plans are smaller. Incidents and problems are easier to manage and determine and even more important, problem ownership is simple and clear. Most of the time without requiring any [discussion / communication / questioning / labour / cost] with the 'external' website owners and/or the (javascript) endusers.

Then again, a serverside driven database feed would make it possible to make ads more accessible, technically (W3C-wise), for text-browsers, non-javascript browsers, screenreaders, (adblockers), etc.

Hey... I want both! ;)

thedealmaker

9:31 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



So, can I set any of those parameters I talked about in Adsense account without changing those script directly?

And what are all the possible parameters (like google_ad_height) that all web publishers can set in that script?

zCat

9:43 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



Storing an AdSense publisher's settings in some form of database would add a whole new layer of complexity to the system. If I was programming a small scale ad serving system, I'd probably be tempted to generate a database key which refers to settings previously set by an advertiser. However, if Google did this, they'd have the problem of having to relialbly and speedily replicate this info to all data centers; you might not be able to instantly see changes to your ad format for example. The additional time needed for the database lookup would also be a problem: it might only typically be a few milliseconds, but it's a further point of failure or delay in a system which needs to be fast.

ChadSEO

10:03 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



thedealmaker,

The parameters that I am aware of are:

  • google_ad_channel - Custom channel id, different from name
  • google_ad_client - Your client ID for AdSense
  • google_ad_format - Format code based on ad size and type
  • google_ad_height - Ad height
  • google_ad_type - Ad type, text, image, text/image
  • google_ad_width - Ad width
  • google_alternate_ad_url - Alternative URL to use instead of Public Service Ad
  • google_alternate_color - Alternative color to use instead of PSA
  • google_color_bg - Background color code (RGB format)
  • google_color_border - Border color code (RGB format)
  • google_color_link - Link text color code (RGB format)
  • google_color_text - Text color code (RGB format)
  • google_color_url - URL color code (RGB format)

    All of the google_color variables can also be arrays of color codes to be chosen at random.

    Chad

  •