How to Serve an Ad

  • Written By:
  • Published:

The Problem

If you know in advance which ad you want on each page of your site you do not need an ad server. Historically, the first application of ad serving was for banner rotation. Rather than have a single advertisement appear to everyone who looks at a page, every time they view it, web sites wanted the ability to sell that ad position to many advertisers. When the page is viewed, every advertiser has an equal chance of showing up.

You do not need expensive software to do simple rotation. What you do need is a way to make sure that the right ad shows up on the user's browser. This is outside the capability of simple HTML. The easiest way to accomplish rotation was to write a CGI (Common Gateway Interface) program. CGI is a protocol for sending information from a browser back to the web server; it lies behind most forms that you might fill out on the web. Although we will not go into programming details, it will help to see the difference between a simple image tag and a CGI call.

If we wanted to put a banner ad on a page we would use an HTML image tag that looked something like this:

<IMG SRC="images/ad.gif">

This tag identifies itself as an image tag with the IMG keyword, and points to the file that is to be displayed using the "SRC" keyword; here the file is called ad.gif and it is found in the images/ subdirectory of the site. If the page is to rotate ads, then the image tag must be replaced by something that will generate a reference to an ad at the time that the page is loaded to the surfer's browser. The simplest possibility would look like this:

<IMG SRC="cgi/ad.cgi">

This tells the browser to get the ad from something called ad.cgi, which lives in a directory called cgi/. The kicker is that ad.cgi is a program. When the surfer's browser sends a request for ad.cgi, the program picks one of the available ad images and sends that back to the browser.

What Advertisers Really Want

What this simple story does not tell is that advertisers want more than to have an image displayed. They want to draw interested surfers to look at more information, or to sign up for something, or to make a purchase. When there is only one ad to put on the page, the HTML would look like this:

<A HREF=""><IMG SRC="images/ad.gif"></A>

The HREF tag associates the advertiser's home page with the image, so that a surfer who clicks on the image will be taken to that page. It might seem that the proper extension to support ad rotation would be:

<A HREF="cgi/homepage.cgi"><IMG SRC="cgi/ad.gif"></A>

but this fails for a fundamental reason. The program ad.cgi is executed when the page is being loaded. But the program homepage.cgi, which would return the homepage associated with the ad, does not get executed until the surfer clicks on the ad. Since the Internet is normally stateless, when the program homepage.cgi is executed it will not know which image was served up by ad.cgi, and without that information it will not know which advertiser's home page the surfer should see.

Simply speaking there are two ways to overcome this difficulty. The first is to arrange for both an ad image and a homepage address to be placed on the page just before the page is sent to the surfer's browser. The second is find a way to store some state information on the server so that when a surfer clicks on an ad image it will be possible to know which ad was displayed, and to then choose the appropriate homepage for the surfer. Either technology can be used, and NetGravity is one vendor who offers both. (See TEC Technology Research Note: "Can High Flying NetGravity Maintain Its Position?" October 3rd, 1999)

What we have so far can be achieved in a program at most a few dozen lines long. But things have barely begun to get interesting. The website publisher does not want all ads to have an equal chance of being on every page. Perhaps the home page should command a higher premium, or the publisher wants to ensure that ads from airlines do not show up on pages discussing potential Y2K problems at the FAA. Passing information along with the program invocation can accommodate such considerations; of course the program would have to be made more powerful so that it could make use of the information. As an example, when the lead story is about airlines, the page editor might change the image tag to read:

<IMG SRC="cgi/ad.cgi?TOPIC=airlines">

For this to work, of course, the program will have to have topics associated with each ad, which is going to call for some kind of database.

There are other serving considerations that do not require passing information, because the information is already available. For example, a movie distributor might want its ads displayed with a higher frequency on Thursdays and Fridays, reasoning that those are days that surfers will be most likely to pay attention to a movie ad. The ad server knows the day and time, so that information does not have to be sent from the page. However, the database will have to be augmented with information about times of day and frequencies of serving ads. Actually, advertisers tend to purchase not frequencies but numbers of impressions, but the principle is the same. Of course, if the website is selling impressions, it had better be able to tell the sales staff how many impressions are available. The total number of impressions will have to be based on projections of website activity. The number available will have to take account of all the different sales that have already been made. By now we have definitely graduated from the kind of program that a smart kid can pull together in a day of tinkering.

Show Ads to People Who Will Respond

While some advertisers may be happy to have their ad shown to any surfers, many prefer to advertise only to people who are likely to respond. An ad for an ultra-cool sports car will get a better return on investment when shown to young professional males than it will when shown to the grandmothers. If a website can identify some information about its visitors and use that information to target ads, it can typically charge more for advertising. The information does not have to be very sophisticated. For example, the website always knows where - what company or ISP -- the surfer is working from. If the surfer is an AOL user, and there are quite a few of them, the website can target ads based on the known demographics of AOL subscribers. If the surfer is coming from a site that belongs to a firm involved in electronics manufacturing, a different kind of ad could be served.

Even higher potential payoffs are available for more precise targeting. DoubleClick is a company that serves ads for many companies on an outsourced basis. The real value added comes in the data that DoubleClick collects. Since the ads are served from the DoubleClick server, DoubleClick can accumulate information on surfers from their behavior on many different websites. If Amanda clicks on a car ad when visiting one site that is served by DoubleClick, she will probably see a car ad when she visits other DoubleClick client sites.

The more a website can zero in on the characteristics of the surfers who visit it, the more attractive it can be to advertisers who want to reach people with those characteristics. One way to gain precision is to learn about individuals. A site can drop a cookie on each visitor's machine, and use that to keep track of the user's behavior. This works even better if the user is willing to register and give some personal information such as age, occupation, or zip code. Or a site can choose to study aggregate behavior of users. If you know that visitors who visit one particular section of the site are twice as likely to clock on a cola ad as are those who do not visit that section, you have a powerful reason for cola makes to give you their advertising. This kind of zeroing in is still in its early stages, and is typically provided by partnerships between ad serving companies and others. However CMGI's Engage subsidiary, which started out with a stand-alone data analysis package, bought ad server Accipiter to be able to offer an integrated serving and targeting capability, and recently announced a powerful new targeting product .

Another trend to watch in advertising is delivery of ads that are more interesting than static banners. This began with animated GIF files, and has progressed to the point where banners can interact using technologies like Shockwave and Java. At the other end of the spectrum are ads that look like simple HTML links - text with no image at all. These are used for ads that can be inserted unobtrusively, or sent out in e-mail newsletters.


Selecting an ad serving solution, whether it is outsourced or served from the website's own servers, requires coordination between the business and technical sides of a company. Selling ads is a complex business that changes rapidly and is driven by cultural as well as business concerns. IT personnel may not be used to the mercurial nature of requirements in this arena. However, they need to be aware that the cost of deployment of advertising solutions can be proportionally much higher than with other products, especially when the costs of lost ad serving opportunities or of loss of website business are factored in. As new products and technologies tumble into the marketplace, IT will have to evaluate both the degree to which they can solve the real needs on the business side and the stability and integration costs that will be incurred in implementing those solutions.

comments powered by Disqus