Placing Ad Units on Your Site

Publishers need to take the following fairly simple steps to place ad units on your site:

Note

Bear in mind the suggestion in Chapter 1 that ad unit code be placed within an include architecture, allowing the flexibility to change ads across multiple pages, portions of sites, or entire sites. In addition, placing the ad code within an include means that you can easily switch who you work with.

Figure 6-4 shows the AdBrite signup form, which is pretty typical of most programs.

You’ll also need to provide who you want checks made out to and a tax identification number (either a Social Security number or an employer identification number).

In addition, some of the programs (such as Google) will want at least one website URL. They will manually vet the site for compliance with program content policies before accepting you into the program.

Once you’ve been accepted, you can choose the kinds of ads you want to serve. On AdBrite, as shown in Figure 6-5, the choices are banner and text versus text only, full-page in-between ads, and inline ads.

Once you’ve chosen the kinds of ads you want to serve, you can choose ad formats—meaning the size of the ad unit and number of ads—and colors for your site.

Most programs provide a number of ad unit sizes to choose from, and also some preselected color schemes. Figure 6-6 shows the AdBrite program ad generator.

Note

The design choices you make in relationship to ad format and color are quite important. See Chapter 1 for some discussion of ad placement. In addition, you should consider two possible, but incompatible, strategies: making ads seem like they are part of a site’s content and making ads different so they really stick out.

You’ll also need to set some ad content options, as well as to specify the default ad that appears when there are no paid ads to display (see Figure 6-7).

With the ad content set, you can refine the appearance of your ad unit (Figure 6-8).

The next step is to describe your site using a description and keywords (Figure 6-9). This is for two reasons: to help AdBrite make a better contextual match, and also to serve as an advertisement of your own to potential advertisers. The keywords and description you include do appear to any advertiser seeking a good host for their ads.

Next, choose a category for your site from the list, shown in Figure 6-10. Once again, this selection is multipurpose—you are helping AdBrite contextualize your site and also helping potential advertisers find you.

Optionally, AdBrite will integrate your existing ad code, such as that from AdSense, into their own unit, asserting that they will serve the highest paying ad from both networks.

To take advantage of this, choose Yes to Reserve Pricing in the pricing options interface shown in Figure 6-11. You’ll need to make sure the ad unit that you are integrating with AdBrite’s has the same dimensions, and you’ll have to paste the code from the other ad server into the HTML box shown in Figure 6-11.

If you’d rather not integrate ad units, and want to place the AdBrite unit in addition to another unit, choose No to Reserve Pricing. In either case, you can proceed to pick up the code you’ll need to add to your site.

Once you’ve selected your ad format, colors, and entered other options, AdBrite will generate the code for your unit, as you can see in Figure 6-12.

Simply copy the code provided into your web pages where you’d like the ad units to appear.

Note

It’s important to place ad code in include files, as I explained in Chapter 1, so that your ad settings can easily be modified site-wide.

Ad unit code consists of settings, which depend on your choice of format and color, and a JavaScript call to the program on the ad server that actually displays the ad on your site (see Serving Ads for an explanation of this mechanism).

For example, an AdBrite ad unit might look like this in code:

<!-- Begin: AdBrite, Generated: 2008-12-19 13:56:19  -->
<script type="text/javascript">
var AdBrite_Title_Color = 'CC0000';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'CCCCCC';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '0000FF';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.
referrer==''?document.location:document.referrer;AdBrite_Referrer=
encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var 
AdBrite_Referrer='';}
</script>
<script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,
80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=
967865&zs=3132305f363030&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" 
type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,
84,62));</script>
<div><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?
opid=967865&afsid=1" style="font-weight:bold;font-family:Arial;font-size:13px;">
Your Ad Here</a></div>
<!-- End: AdBrite -->

You can tweak the settings in the ad code easily enough to change the format or the colors of the ads displayed. For example, in the code sample just shown, changing the value of the variable AdBrite_Text_Color will change the color of the text displayed in the AdBrite unit.

Technically, tweaking this code directly is prohibited by some TOS, although AdBrite doesn’t seem to care as long as you don’t break anything. The bottom line is that no one will mind if you are just adjusting things to fit in with your site’s look and feel.

Once your ad code has been copied to your site, you’ll get a temporary ad like the one shown in Figure 6-13 until AdBrite has learned about your site.

Once AdBrite has fully gathered data and has some contextual ads to serve, the ads will appear in your AdBrite unit on your site, depending on your choice of format, for example, as shown in Figure 6-14.