Use Ad Exchange and AdSense line items
This feature is not available in DFP Small Business.
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.
After you link your DoubleClick for Publishers account to your AdSense or Ad Exchange account, you’ll see a list of ad units created in those products, filtered by size, when you create a new AdSense or Ad Exchange creative in DoubleClick for Publishers. You need only select the ad unit to link it to the creative. You also have the option to copy, paste and edit code snippet from the ad unit if you want to override certain elements, such as size.
- If you use Ad Exchange, visit the Ad Exchange help center learn how to get started with Ad Exchange.
- If you use AdSense, visit the AdSense help center to learn how to manage your AdSense ads.
Create AdSense or Ad Exchange ads
- Link your AdSense or Ad Exchange products to your DoubleClick for Publishers account.
Create an AdSense or Ad Exchange line item and set its targeting criteria.If your DFP ad unit has multiple sizes, create one line item containing multiple creatives, one per desired size.
For example, if a publisher has an ad unit that supports 300x250 and 300x600, and wants to make that inventory available to Ad Exchange, the publisher should target that ad unit with a single Ad Exchange line item that contains both creative sizes.
Click Add creatives and select new creative.
If you're creating an Ad Exchange line item, you can click Automatically generate all creatives in the "Creatives" section to bypass this step.
If you have multiple AdSense or Ad Exchange accounts associated with your DFP network, you can't change the AdSense or Ad Exchange account linked to the line item after a creative has been assigned to the line item (even if the creative is later removed from the line item). You need to create a new line item if you wish to associate a different AdSense or Ad Exchange account with the line item.
Once you add creatives, you cannot change the priority type for Ad Exchange or AdSense line items.
- Click Select dynamic allocation ad unit by name. Click or begin typing to see a list of available AdSense or Ad Exchange ad unit or tags that match the size(s) of the line item.
- Select the AdSense or Ad Exchange ad unit or tag to which you want to target the line item.
If you’re working with an AdSense property, you can select Import dynamic allocation ad unit code snippet and paste the code snippet from your AdSense account into the "Code snippet" box. This is also useful if you require other ad attributes, such as background, border or text color, or if you want to edit creative size.See an example of an AdSense code snippet
google_ad_slotis optional for publishers that have Ad Exchange Rules enabled.
google_ad_clientacts as an override if specified; default is read from the line item.
google_ad_slotact 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.
If you see an error: "Web property in snippet does not match web property in line item", when saving your AdSense or Ad Exchange line item, the web property ID included in the ad unit code snippet you pasted into the creative window does not match the account associated with your DFP account. If you have multiple AdSense or Ad Exchange accounts, make sure you're copying the ad unit code from the one associated with your DFP account.
- Enter a Name for the creative.
- Click Save.
- (Optional) Review individual Ad Exchange ads and choose whether to let them show on your pages.
- Report on your AdSense or Ad Exchange line items.
If you pick the exact same targeting criteria and priority level for all of them, DFP 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.
AdSense and Ad Exchange line items can compete with all line items other than sponsorships. (Learn more about dynamic allocation.)
If two AdSense or Ad Exchange line items of equal numerical priority are eligible to serve to an impression, then DFP chooses one at random.
DoubleClick for Publishers then sends the selected line item to AdSense or Ad Exchange, which evaluates the line item against its inventory. If AdSense or Ad Exchange has an ad with a price that is greater than or equal to the price of the line item picked by DoubleClick for Publishers, then the AdSense or Ad Exchange line item will deliver. If the line item from DoubleClick for Publishers has the higher price, then that line item will deliver. Remember that enhanced dynamic allocation calculates a temporary CPM value for each line item, rather than using the user-entered value from DFP.
Since AdSense and Ad Exchange line items are non-guaranteed inventory, you can’t forecast their inventory.
However, for Ad Exchange line items, you can predict the number of queries that will be available. Learn how to forecast queries for an Ad Exchange line item.
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 DoubleClick for Publisher tags. There is no need to put AdSense or Ad Exchange tags directly onto your website.
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.
When an ad, such as one for AdSense or the Ad Exchange, is served inside a nested iframe, browser security features prevent the ad from detecting the page URL or domain to use for targeting. As a result, the most relevant ad is not served and ad revenue is lower than it could be.
See Detect a page URL or domain in iframes to learn how to prevent this problem.
If you've upgraded from a DoubleClick for Publishers Small Business account, then you might also be using inventory-level dynamic allocation. Learn about dynamic allocation in our Small Business help center, and understand how inventory-level and line-item level dynamic allocation can interact.