DFP overview

Design your inventory

Now that you've identified your inventory, it's time to design your ad unit hierarchy and the custom criteria that you'll be using as a prerequisite to building your inventory.

Your inventory is made up of two major components: an ad unit hierarchy that describes the relationship between individual ad units, and a list of custom criteria that is used to further distinguish the ad slots on your website. This article walks you through how to determine your targeting requirements, how to choose between ad units and custom criteria, and how to build out your ad unit hierarchy.

1. Determine your requirements

To determine your requirements, we recommend that you start by identifying the ways that you want to sell, report on, and forecast your inventory. As a best practice, you should include representatives from Sales, Ad Ops, Web Development, and your reporting stakeholders in this discussion.

You may find it helpful to review your sitemap, ad specs, rate card, sample reports, and any existing campaigns / IOs for this information. Think carefully about the targeting options that you offer your advertisers today as well as the targeting options you'd like to offer them in the future. The more specific you can be about your requirements the better. You can use a bulleted list to quickly and easily document your requirements.

Example: List of requirements for a traditional newspaper website

Imagine your site is structured like a traditional newspaper with sections for sports, finance, and weather. Your requirements list might look something like this:

  • Target a line item to a specific section of your website.
  • Target a line item to all of your sports subsections.
  • Exclude your finance section from Run of Network (RON) line items.
  • Target all of your sports, finance, and weather landing pages.
  • Target a line item to a specific gender anywhere on your website.
  • Target a line item to a specific sports team anywhere on your website.
  • Target a line item to your visitors that are based in Canada.

A landing page is typically a top-level destination page that contains subsections or subpages. For example, a news website could have a Sports landing page with Football, Baseball, Basketball, and Hockey subsections.

Now that you've determined your requirements, it's time to use them to help you choose between ad units and custom criteria.

2. Choose ad units and custom criteria

In general, our most successful clients maintain a simple, structured ad unit hierarchy with a few custom criteria. We recommend building a network that's easy for advertisers to understand.

For each of the targeting requirements that you've identified in Step 1 above, compare the following ad unit and custom criteria features to determine what you should use (for bandwidth, geography, or operating system, you would generally use system-defined criteria):

Ad unit features Custom criteria features

Ad tags, which represent ad slots on your website, are made up of a single ad unit, but can contain multiple custom criteria.

Ad units are primarily used for targeting sections of your website or content that have a hierarchical relationship. By targeting a parent ad unit, you automatically target all of its children as well. This is commonly known as "flow-down" or "vertical" targeting.

  • Five-level inventory hierarchy: The Google Publisher Tag allows you to use five levels of ad units. With five levels of hierarchy, you'll be able to create much more specific targeting based on your site content.

    See an example hierarchy of a traditional newspaper website.

  • Suggested ad units: If the ad server receives at least 10 requests for an undefined ad unit, DFP will suggest that you define it on the Inventory tab. The list of suggested ad units is updated once a day, so when you include an ad unit in an ad tag, it will show up on the list of suggested ad units no more than 24 hours later. To use this feature, click the Inventory tab, click Network settings, and select Get suggestions for new ad units. The list of suggested ad units can be periodically reviewed to catch ad tags with typos in them as well.

  • Special ad units: You can mark an ad unit as 'special' which protects expensive, sensitive, or strategic inventory from 'flow-down' targeting. Common examples of where publishers use special ad units are on their homepage, on their landing pages, and on other areas of their site that get a lot of traffic.

  • Placements: You can use placements to identify groups of related ad units that are interesting to advertisers. Common examples include a placement for all of the leaderboards on your site, a placement for all of your seasonal ad slots, and a placement for all of the homepages in your network if you own multiple websites.

Custom criteria are primarily used to target characteristics that are common across your website. This is commonly known as "cross-site" or "horizontal" targeting. There are two types of custom criteria: user-defined and system-defined:

  • User-defined criteria are commonly called "key-values". They are typically used to target demographics (e.g. gender=female) or dynamic content (e.g. articleID=12345, position=top, search=funny cats). Key-values need to be added to ad tags before then can be used.

  • System-defined criteria includes bandwidth, geography, and operating system. These values are handled by the ad server behind the scenes and don't need to be added to your ad tags.

  • Predefined key-values: You can use predefined key-values when you know the possible values of a targeting key in advance (e.g. gender=female, gender=male, age=18-24, age=25-34, etc.)

  • Free-form key-values: You can use free-form key-values when you want to dynamically pass targeting values into an ad tag based on information you you collect from your users or based on values that are generated by your Content Management System (CMS). You can add values for free-form keys to suggest values to your traffickers while still allowing them to enter their own. (e.g. search=, pos=, articleID=)

  • "Includes" matching: You can target an ad to all of the ad tags that include at least one of the words in a value by using a tilde (~) in the line item's targeting value. See Targeting criteria to learn more about "includes" matching.

  • "Begins with" matching: You can target an ad to all of the ad tags when the first few characters in a value in the ad tag exactly match all of the characters preceding the asterisk (*) in the line item's targeting value. See Targeting criteria to learn more about "begins with" matching.

  • Encoded key-values: You might use encoded key-values in your ad tag if you don't want visitors to worry about the information that's passed in your ad tag. For example, if you are targeting females, you would use the encoded key-value g=f in the ad tag. To make it easier for traffickers to find this key-value in DFP, you can assign the display name gender=female to the key-value. (See Define custom targeting criteria to learn how to define key-values.)

  • Complex targeting expressions You can target an ad to a very specific set of custom criteria by targeting multiple keys and values simultaneously. Values within a targeting key can be treated as either AND or OR statements. (See Targeting criteria to learn more.)


Example: Chosing ad units and custom criteria for a traditional newspaper website

Continuing our example of a newspaper website, the table below illustrates how you would use ad units, key-values, and system-defined criteria to meet those requirements.

What you want to do What you should use
Target an ad to specific section of your website. Ad units are primarily used to target sections of your website.
Easily target an ad to all of your sports subsections. Ad units provide "flow-down" targeting which enables this.
Exclude your finance section from Run of Network ads. You should mark the finance section as a special ad unit.
Easily target all of your sports, finance, and weather landing pages. You should combine all of your landing pages in a placement.
Target an ad to a specific gender anywhere on your website. Key-values provide "cross-site" or "horizontal" targeting that enables this (e.g. gender=female).
Target an ad to a specific sports team anywhere on your website. Key-values provide "cross-site" or "horizontal" targeting that enables this (e.g. team=yankees).
Target an ad to your visitors that are based in Canada. Geography is a system-defined criterion, which is handled for you behind the scenes.

Now that you've decided how you'll be using ad units, key-values defined by you, and system-defined criteria to design and target your inventory, it's time to build out your ad unit hierarchy.

3. Build out your ad unit hierarchy

Identify the structure of your network

We recommend reviewing the navigation of your site, the variables in your CMS, and your URL structure. Some publishers find that creating ad units based on publicly viewable information like website navigation or URL structure makes it easier for advertisers to understand where their ads are appearing.


Identify the parent/child relationships between the different sections of your website

The topmost sections of your website should also be the top-level ad units in your network. If you manage multiple websites or companies, you can use the top-level ad units to represent each of those websites and companies. Subsections should be second-level ad units, subsections of subsections can be third-level ad units and so on.

Example 1: Traditional newspaper website

Example 2: Multiple websites / ad network


Keep it simple

Your inventory structure can contain up to five levels of hierarchy if you are using Google for Publisher Tags. However, you aren't required to use five levels, and we recommend only creating lower-level ad units for sections that generate a significant amount of traffic. We find that ad units that generate at least hundreds of daily impressions are the most useful for targeting, forecasting, and reporting.

You should only create a unique ad unit for unique URLs that you target frequently and that get a significant amount of traffic. For example, you may want create a unique ad unit for your home page and for top read articles, but we don't recommend creating a unique ad unit for every article. Our most successful clients typically have fewer than 50 ad units at the highest level of their hierarchy and within each branch.


Avoid typos

We recommend using all lowercase letters and avoiding special characters when creating ad units. You can only use alphanumeric characters, periods, hyphens, and underscores (no spaces or slashes). This will reduce the chance that the values in the ad tag don't match the values in DFP.