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, 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.

    • Each code must be unique; you can't reuse codes that 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 that 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. Find out 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. Find out 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 maximise the revenue of unsold and non-guaranteed inventory with AdSense, select the Maximise revenue of unsold and remnant inventory with AdSense tick box. (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 labelling 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. Find out more about refresh rates.

  8. Click on 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 that 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've finisheed, 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_HelpCentre_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 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 colour Use hexadecimal (six-character) colour code, without a pound sign, such as FFFFFF.
Title colour
Background colour
Text colour
URL colour
Ad type The ad type can be text or image, or you can use both, separated by a comma.

How helpful is this article:

Feedback recorded. Thank you.
  • Not at all helpful
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful