Traffic AdSense or Ad Exchange ads in DFP

You can create line items for your AdSense or Ad Exchange ads and target them to specific inventory units and audiences just as you would any other line item in DoubleClick for Publishers.

This feature is not available by default to all Small Business publishers. Please contact your account manager if you're interested in enabling it.
About AdSense and Ad Exchange line items

How are AdSense or Ad Exchange line items picked for delivery?

AdSense and Ad Exchange line items compete with other preemptible line items set at the same priority or lower. For example, if a line item is given an AdSense delivery type, it will look at all non-guaranteed line items and pick the line item with the best CPC or CPM rate.

DoubleClick for Publishers then sends its best line item to AdSense or Ad Exchange, which evaluates the line item against its inventory. If AdSense or Ad Exchange has an ad unit that can beat the price of the line item picked by DoubleClick for Publishers, then the AdSense or Ad Exchange line item is delivered. If the line item from DoubleClick for Publishers still has the best price, then that line item is delivered. Learn more about dynamic allocation

Can I check available inventory for AdSense or Ad Exchange line items?

No. Since AdSense and Ad Exchange line items are non-guaranteed inventory, you can’t forecast their inventory.

Do I have to add AdSense or Ad Exchange tags to my website?

No. Once you traffic AdSense and Ad Exchange line items in DoubleClick for Publishers, the AdSense or Ad Exchange line items can be delivered through DFP Small Business tags. There is no need to put AdSense or Ad Exchange tags directly onto your website.

How is web page layout affected?

AdSense and Ad Exchange line items delivered through DoubleClick for Publishers aren't aware of other AdSense or Ad Exchange line items on your webpage. The function that AdSense and Ad Exchange use to lay out a full page, and to prevent duplicate delivery of a single ad, is disabled by the AdSense and Ad Exchange in DoubleClick for Publishers feature.

To target your AdSense or Ad Exchange ads:

  1. Link your AdSense or Ad Exchange products to your DoubleClick for Publishers account.

    Even if you already use AdSense dynamic allocation at the inventory level, you still need follow the network linking process to link any AdSense accounts you'd like to use for dynamic allocation at the line item level.

  2. Create an AdSense or Ad Exchange line item and set its targeting criteria.

    If your AdSense or Ad Exchange ad unit has multiple sizes, you can create one line item for them all.

  3. Click Add creatives and select new creative.
    • If you're creating an Ad Exchange line item and the selected web property alias in the "Settings" section of the line item is an Ad Exchange web property that has Rules enabled, you can bypass this step by clicking Automatically generate all creatives in the "Creatives" section.
    • Once you add creatives, you cannot change the priority type for Ad Exchange or AdSense line items.
    The "New creative" screen opens.
  4. Click Select dynamic allocation ad unit by name. Click or begin typing to see a list of available AdSense or Ad Exchange ad units that match the size(s) of the line item.
  5. Select the AdSense or Ad Exchange ad unit to which you want to target the line item.
  6. Alternatively,if you're working with an AdSense property or an Ad Exchange property that does not have rules Rules enabled, you can select Import dynamic allocation ad unit code snippet and paste the code snippet from your AdSense or Ad Exchange account into the "Code snippet" box. This is especially useful if you require other ad attributes, such as background, border or text color, or if you want to override creative size. Example AdSense code snippet
    <script type="text/javascript"><!--
    google_ad_client = "ADSENSE_PUBLISHER_ID";
    google_ad_slot = "AD_SLOT_NUMBER";
    google_ad_width = WIDTH;
    google_ad_height = HEIGHT;
    <script type="text/javascript" src="">
    <noscript> <img height=1 width=1 border=0 src=""/>

    google_ad_slot is optional for publishers that have Ad Exchange Rules enabled.
    google_ad_client acts as an override if specified; default is read from the line item.
    google_ad_width and google_ad_slot act as overrides if specified; defaults are read from the creative (required) or the line item creative association (if specifically overridden there).

    You can also add the following optional attributes to the line after google_ad_height = HEIGHT;:

    google_ad_border = 
    google_ad_bg = 
    google_ad_link = 
    google_ad_text = 
    google_ad_url  = 

    When you paste a code snippet into the “Code snippet” box, DFP extracts the parameters detailed above and ignores everything else at the time of ad serving. This means any additional code, such as click-tracking macros, are also ignored.

    Even if the same creative always displays when you preview the line item in DoubleClick for Publishers, please note that when the line item delivers on the actual website it might display a different creative. This is because AdSense uses contextual targeting, which means that it uses the actual webpage content to determine which creative to serve.

  7. Enter a Name for the creative.
  8. Click Save. Why do I see this error: “Web property in snippet does not match web property in line item”?
    If you see this error when trying to save your AdSense or Ad Exchange line item, it's because the web property entered at the creative level doesn't match the one at the line item level.
  9. Report on your AdSense or Ad Exchange line items.
If you have multiple AdSense or Ad Exchange line items that have the same priority level, you should ensure that they have different targeting criteria from one another so that they all become eligible to compete. If you pick the exact same targeting criteria and priority level for all of them, DoubleClick for Publishers will pick one at random to compete, which may not earn you the most money. (Higher priority line items will be selected over lower priority line items.)

How helpful is this article:

Feedback recorded. Thanks!
  • Not at all helpful
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful