/adserver system

part of the ArsDigita Community System by ArsDigita and others.
Remember that the underlying rationale for the ad server is set forth in Chapter 3 of "the book".

The major feature of the adserver not covered by the book is that there is a notion of ad groups. For example, if there are four ads that you'd like a user to see in sequence, you can make them part of a group and then make all the pages in a section of a site reference that group. The page need only call adserver_get_ad_html with the group_key as an argument and it will get back a reference to the next appropriate ad from that group.

Groups can be used for management or for selection of ads. For instance, you may have the Amazon group, indicating ads placed by Amazon.com. You may have a sports group, indicating ads that are related to sports. You might have a frontpage group, for ads that should appear on the frontpage. Ads can be members of more than one group.

Within a group, ads can be chosed randomly, in sequential order, or the least seen ad can be the next ad chosen. GIF or JPEG files for ads are stored in /ads.

The basic html for an ad looks like:

<a href="/adserver/adhref?adv_key=pfizer">
<img src="/adserver/adimg?adv_key=pfizer">
These references can be created for you in many ways:

If the ad server gets confused, it tries to always serve up something to fill the space. It looks for [ad_parameters DefaultAd] and [ad_parameters DefaultTargetUrl]. If it can't find those, it notifies the site administrator to define them.