Line items

AdSense line items

Google Ad Manager makes it easy to give AdSense buyers access to your inventory.

This article explains how AdSense ads serve through Ad Manager and the required steps to get started. 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.

Providing greater access to your inventory helps monetize every impression in your network and generate revenue. You can decide which inventory is available to AdSense buyers with AdSense line items.

Before you get started

Be sure AdSense is set up in Google Ad Manager. AdSense can be toggled on and off at the network and ad unit levels in Ad Manager.

Add new AdSense line items

  1. Sign in to Google Ad Manager.
  2. Click Delivery and then Orders.
  3. Find an existing order, or create a new order.
  4. 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."
  5. Click Save.

Add creatives

  1. Add a creative to the line item.
  2. 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.

  3. 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 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:

  • 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 uses 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.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
14947174945290171562
true
Search Help Center
true
true
true
true
true
148
false
false
false
false