Getting started guide

Create an ad unit

You can create ad units one at a time or bulk upload ad units using a spreadsheet.

New ad units must be on a site or in an app for seven days to collect a sufficient amount of data for inventory availability queries. However, DFP uses 28 days of prior traffic for forecasting. As a result, forecasting accuracy will increase over the first four weeks.

To add a new ad unit size to your network, simply create a new ad unit and give it the new size, or set the new size for an existing ad unit.

Create one ad unit at a time

  1. Click the Inventory tab.

  2. Click New ad unit.

  3. Enter a Code, which is used to identify the ad unit in the associated ad tag.

    Often publishers choose to use codes that identify the ad unit's location and size. For example, you might use the format SiteName_Section_SubSection_Location_PagePosition_WxH, and a specific ad unit code might be ABCPublisher_News_International_RightSidebarTop_120x600.

    • Only letters, numbers, underscores, hyphens, periods, asterisks, forward slashes, backslashes, exclamations, left angle brackets, colons and parentheses are allowed.

    • Ad unit codes can be up to 100 characters in length.

    • Once you've created the ad unit, you can't change the code.

    • Each code must be unique; you can't reuse codes you've used before.

  4. Enter a Name for the ad unit, which is used in targeting and reports. You can change the name at any time. As with the code, publishers typically use naming conventions that give information about the ad unit's location and size.

  5. Set the Sizes for the ad unit.

    • Select Fixed size and then enter the size of the creatives the ad unit can host. You can enter multiple sizes if you want to use the same ad unit for multiple ad slots or across different platforms with different sizes, such as mobile and desktop.

    • Select Smart Banner if the ad unit is for a mobile app and you want the ad unit to fill the width of the screen and have a fixed height. The Google Mobile Ads SDK has native support for Smart Banners and will add pillarboxing (black bars to the left and right of the banner) to the creative as necessary to fill the entire current width of the banner view.

  6. Define a target window, which identifies the browser window where an ad's landing page will open. This value is set as the target attribute of the ad link.

    • _top: The target URL will load in the full body of the window, breaking out of any potential framesets. This value is selected by default.

    • _blank: The target URL will open in a new, unnamed window.

    If the ad unit is in an application, the target window is ignored. On webpages on Android devices, an external browser window opens; on webpages on iOS devices, an in-app web view opens.

  7. Add optional features and settings to the ad unit as needed.

    • Associate the ad unit with one or more placements by clicking Add next to the appropriate placements.

    • If you'd like to maximize the revenue of unsold and non-guaranteed inventory with AdSense, select the Maximize revenue of unsold and remnant inventory with AdSense checkbox. (If all ad units in your network are enabled for AdSense by default, the AdSense inventory settings field will display Enabled.)

      Ad units enabled for AdSense will only compete with AdSense if certain criteria are met; AdSense competition doesn't work for ad units that are placed in mobile apps.

    • Click Add a labeling rule under Ad unit frequency caps to choose the number of impressions to be shown to each user per time period for the creatives that share the label. Learn more about using labels to set frequency caps for creatives.

  8. Click Save.

 

Bulk upload ad units in a CSV file

You can create ad units by uploading a CSV file into DFP.

To bulk upload ad units:

  1. Click the Inventory tab.

  2. Click Bulk upload new ad units.

  3. Click Download sample CSV file to download a file that you can use to define your ad units. The sample CSV file will contain the fields and examples that are relevant to your network, based on the features you have enabled. Don't change the column order or the column headings.

  4. Open the CSV file and make changes based on the examples and the descriptions in the tables below. When you're done, save the CSV file.

  5. Click Choose File to find your CSV file.

  6. Click Upload and validate.

  7. Verify that the ad unit settings are correct.

  8. Click Confirm upload to upload the new ad units.

The values for each column must follow the same formatting rules as those fields when you create an ad unit directly in DFP.

 
Column Description
#Code The ad unit code, used in the tags. Only letters, numbers, underscores, hyphens, periods, asterisks, forward slashes, backslashes, exclamations, left angle brackets, colons and parentheses are allowed. Maximum 100 characters. Example: MyCompany_HelpCenter_FAQs_Top_728x90
Name The ad unit name, which you can change later.
Size Ad unit size, in pixels, in WIDTHxHEIGHT format. Use a standard AdSense ad unit size to enable an ad unit for AdSense. Otherwise, any size is acceptable.
Description Maximum 4,000 characters.
Placements To assign the ad unit to a placement, enter the placement name.
Target window Enter _top to load the target URL in the full body of the window. Enter _blank to load the target URL in a new, unnamed window.

This column doesn't affect mobile ad units. If you specify mobile as the target platform, leave this column blank.
Target platform Enter mobile or web.
Mobile platform Enter application to define the ad unit as a mobile application ad unit. Leave the column blank to define the ad unit as a web ad unit.

The following columns are included in the CSV file if your DFP account is linked to an AdSense account.

 
Column Description
Enabled for AdSense

Enter TRUE to allow AdSense to deliver ads to the ad unit. If you enable AdSense, you can enter values for the additional AdSense columns, listed below. To apply default AdSense settings, leave them blank.

Enter FALSE and leave the other AdSense columns blank if you don't want to enable AdSense for this ad unit.

Border color Use hexidecimal (six-character) color code, without a pound sign, such as FFFFFF.
Title color
Background color
Text color
URL color
Ad type The ad type can be text or image, or you can use both, separated by a comma.