You can decide which inventory is available to AdSense buyers with AdSense line items. Most settings, such as targeting and frequency capping, are the same as any other line item type. This article covers the settings that differ and common questions.
Before you get started
You need to link an AdSense account to Ad Manager before you can create new AdSense line items.
Create an AdSense line item
- Sign in to Google Ad Manager.
- Click Delivery Orders.
- Find an existing order, or create a new order.
- Create a line item:
- Keep the default selection of Standard on the "Ad type" page.
- Select AdSense as the "Line item type."
- Keep the default AdSense account, or select another linked AdSense account, as the "Web property alias."
-
Click Save.
- Add a creative to the line item.
- Paste your AdSense code snippet, similar to the example below.
Make sure the web property ID included in your code snippet matches the line item web property alias.
- Click Save.
AdSense code snippets
When you paste a code snippet into the "Code snippet" box, Ad Manager 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 Google Ad Manager, 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.
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>
<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>
google_ad_client
acts as an override if specified; default is read from the line item.google_ad_width
andgoogle_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
:
google_ad_border
google_ad_bg
google_ad_link
google_ad_text
google_ad_url
Common questions
Do I need to add AdSense tags to my website?
No. Once you traffic AdSense and Ad Exchange line items in Google Ad Manager, the AdSense line items can be delivered through your Google Publisher Tags. There is no need to put separate AdSense tags directly onto your website.
How is page layout affected?
AdSense and Ad Exchange line items delivered through Google Ad Manager aren't aware of other AdSense line items on your webpage. The function that AdSense use to lay out a full page, and to prevent duplicate delivery of a single ad, is disabled by the AdSense in Google Ad Manager feature.
How can I serve an AdSense ad inside an iFrame?
When an AdSense ad 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.