Clear search
Close search
Google apps
Main menu

Create an ad unit

Introduction to ad units (1:57)

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 at least 28 days for inventory forecasts to be accurate.

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. For example, you might use the format SiteName_Section_SubSection_Location_PagePosition, and a specific ad unit code might be ABCPublisher_News_International_RightSidebarTop.

    • Only letters, numbers, underscores, hyphens, periods, asterisks, forward slashes, backslashes, exclamations, left angle brackets, right angle brackets, colons and parentheses are allowed.
    • Ad unit codes can be up to 100 characters in length.
    • Ad unit codes are not case-sensitive.
    • Once you've created the ad unit, you can't change the code.
    • For a given ad unit level, each code must be unique; you can't reuse codes you've used before on the same ad unit level.
    • You can reuse codes if they occur on a different ad unit hierarchy. For example, you can reuse home if it occurs in a different path of the hierarchy:
  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.

      Under Fixed size, select Out-of-page if you want to serve creatives that don’t fit in a traditional banner space or browser window. They may include pop-ups, floating line items, and interstitials. Learn more about out-of-page creatives.

    • 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. Learn more about Smart Banners.

  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 app, the target window is ignored. O​n Android ​and iOS apps, ​the ad clicks through to ​an external browser​.

  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.

    • Set a refresh rate to determine how often a new ad impression is generated on a mobile app. If you select Refresh rate in seconds, DFP will auto-populate a value of 60, which you can change to 30 - 120 seconds. Learn more about refresh rates.

  8. Click Save.


Bulk upload ad units in a CSV file
As of April 2016, "Target platform" and "Mobile platform" are no longer available as bulk upload criteria, as they have been deprecated from inventory settings. Do not include these columns in your bulk upload files.

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.
Sizes Ad unit sizes, in pixels, in WIDTHxHEIGHT format, separated by semicolons. 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 force the ad to open in a new, unnamed window.

If the ad unit is in an app, the target window is ignored. On Android and iOS apps, the ad clicks through to an external browser.

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.
Download ad units

You can download a list of all of your ad units at once to review your current ad unit settings and inventory structure.

To bulk download ad units:

  1. In DFP, click the Inventory tab.
  2. Click Ad units, then click Download ad units.
Was this article helpful?