building an ad platform with dfp

Placing an Order

With your ad code in place, your site is now displaying default AdSense ads. They don't pay much, and they're not very attractive. Your real goal is to attract actual advertisers, receive "creative" from them, and upload it to Google for serving on your site. For this tutorial, we'll be pretending that KDMC is your advertiser. Download our set of example ads, unzip the archive, and locate the files that begin with "kdmc-".

Remember that an ad order, or "campaign", is a request by an advertiser for a run of ads on your site, generally within a given time period. Since an order can span multiple ad units, DFP refers to the various placements within an order as "Line Items." We'll be creating one order with three line items, and each line item will have one creative (though it could have more). If we were working with multiple advertisers, we'd have an order for each of them. If a given advertiser were running multiple campaigns, we would place multiple orders. So, the hierarchy looks like this:

Advertiser One
    Order One
        Line Item One
            Creative One
            Creative Two
        Line Item Two
    Order Two
Advertiser Two

For now, let's create a single advertiser with a single order consisting of three line items, each of which has one creative.

New Order

Start by clicking the top Order tab, then New Order:

Give the order a name, such as "KDMC March Workshop Campaign." Click in the company field and look for KDMC. If it's not there, select "Add new company" and enter "KDMC" (this lets you re-use company names in the system). In the Trafficker field, enter the email address of someone in your organization who is responsible for uploading ad creatives (may as well enter your own email address at this point).

DFP will present a single Line Item section (all orders must have at least one item, though they can have more). Give the Line Item a name such as "Leaderboard run." Click in the Inventory Sizes field and you'll see a list of the sizes of all inventory you've defined so far. Select 728x90, since that's the size of a leaderboard ad. Enter any optional comments you'd like (these could be a note-to-self, such as "Pizza banner running through March 2012").

Now take a look at the Settings section. The "Type" you select is critical - refer back to the Order Types section of the Vocabulary page in this tutorial for a refresher. For now, let's assume that KDMC is running a Sponsorship campaign, since that's generally the highest-paying type of ad run. While you're here, experiment with the Type drop-down, and notice how certain fields change depending on the type you've selected. For example, a Standard ad lets you set a certain number of impressions or clicks, while a Sponsorship lets you set a percentage of all impressions - this difference matches the difference in the definitions of those two terms in the Vocabulary section.

Set the Line Item to Sponsorship, starting immediately, ending one month from now, with 100% of all impressions, and a cost of $50 per day. Notice that, if possible, DFP will use this information to calculate the approximate value of this ad run as "Total Cost." Ignore the Adjust Delivery and Add Targeting sections for now - we'll come back to that later.

Because each Line Item must have at least one creative associated with it, clicking Save at this point would cause DFP to warn us that the order is in Draft status. Instead, click the Save And ... button and select Upload Creatives.

On the next screen, DFP will ask you what kind of creative you want to add. This could be an interactive Flash file, ad code from an external ad network, or a basic Image. Choose Image.

From the file browser, select the file kdmc-lb.jpg and give it a name. Finally, enter the all-important click-through URL - this is where users will go when and if they click on the ad. Your advertiser will provide you with the correct URL. For now, just enter, or any functioning URL you like. Make sure the "Target ad unit size" matches the size of the creative you're uploading.

On the next screen, DFP will show you what the uploaded creative looks like, and ask you to Approve it - do so. This step is just confirmation, so you don't show the wrong ad in case a mistake was made during upload.

Now you're ready to add two more Line Items to the order, one each for the sidebar ad and the "below article" ad. Click on Orders at the left of the screen, select your order, and then New Line Item for each. Once all three line items have been added to the order, your order should look a bit like this:

Now it's time to take a look at your site. Are your uploaded ads displaying correctly?

Unfortunately, the answer is probably no. That's OK - there's a good reason for that, which we'll discover in the next section.