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 pre-emptible 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.

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 will not be 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 to follow the network linking process to link any AdSense accounts that 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 the Automatically generate all creatives button in the "Creatives" section.

    The "New creative" screen opens.

  4. Click the Select ad slot by name radio button. 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, you can select Import ad slot 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 colour. Example 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>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    <noscript> <img height=1 width=1 border=0 src="http://pagead2.googlesyndication.com/pagead/imp.gif?client=ca-XXXXXXXXXXXXXX&event=noscript"/>
    </noscript>

    The google_ad_client, google_ad_slot, google_ad_width and google_ad_slot attributes are required.

    You can 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 the ad request is made via a JavaScript tag ( /adj) and the AdSense creative's JavaScript code is returned to the browser, the DoubleClick for Publishers ad server strips out the opening bracket and characters of the comment section. Consequently, when trafficking the creative in DoubleClick for Publishers, remove the comment tags ( <!-- and // --></code>). After you've removed the comment tags, the line item should render correctly.

    In the above example, you can't count clicks on this AdSense ad served through DoubleClick for Publishers, since there is no place to add the click tracking macro within the code.

    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 probably means the web property ID included in the ad unit code snippet that you pasted into the creative window does not match the account associated with your DoubleClick for Publishers account. If you have multiple AdSense or Ad Exchange accounts, make sure that you're copying the ad unit code from the one associated with your DoubleClick for Publishers account.
  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) or publishers will pick one at random to compete, which may not earn you the most money.