Google Interactive Media Ads

Google Interactive Media Ads SDK FAQs

Why am I not getting ads back for all formats?
What does a good descriptionUrl look like?
Why am I receiving the error "Ad response does not contain a valid ad type"?
Do you have a DFP Video ad tag that I can use for testing?
Should I set the adSlotWidth and adSlotHeight to the same values as the sz in my DFP ad tag?
Why doesn't anything happen when my ad tag doesn't have anything trafficked to it?
The demo ad tag looks great, but when I switch it with my ad tag, no ad appears.
I want to request ads using the same tag more than once, but I only get ads for my first request. How do I fix this?
How do I request overlay and full slot AdSense ads using the IMA SDK?

Why am I not getting ads back for all formats?
The test ad tags are set up to always return ads for valid requests. This is meant to facilitate integration and make it easier to test how your player requests and renders ads. However, ads are not always available in every format for your site, account, or ad unit. If your integration is working properly for the test tag but not for your own tag, the cause may be one of the following:
  • If you're using DFP, your publisher ID may not have any ads targeted to it at this time. Also, ensure that you have approved the relevant ads and creatives in DFP.
  • If you're using AdSense, the targeting criteria for your site or test page may not have any active advertisements. The most common cause is the use of private, uncrawled websites. Additionally, ensure that allowScriptAccess is set to "always" since test publisher ID's bypass this requirement but it’s required for live publisher ID's.
  • If you're using Ad Exchange Network Partner Management and descriptionURL is not set or is not on the owned or operated domains management list, ads will not serve to this.
  • Check the minCPM thresholds defined in Ad Exchange Video. A fairly high CPM may result in very low fill rates. To correct this, try either removing the minCPM or removing the ad unit parameter from the ad request (i.e., slotname) to verify whether this is affecting the fill rate.

Back to top

What does a good descriptionUrl look like?
To be most effective, the content of the page that descriptionUrl points to shouldn't be a collection of words or phrases but rather 1-3 paragraphs actually describing the content and your role in providing it. One method that has been successful in the past is to stitch together descriptionUrl page content dynamically from predefined blocks. For example, a few sentences about the content, a few sentences about your site's offering, and then a few predefined snippets associated with each AdSense channel (like "Entertainment" or "Sports"). As a result, each piece of content has a reasonably distinct descriptionUrl associated with it that provides both general information (such as genre descriptors) as well as specific information (content about the content directly).

This metadata HTML should be simple, for example:

<html>
  <head>
    <title>Domain.com - Your tag line here!</title>
  </head>
  <body>
    <h1>Descriptions</h1>
    <h2>About this Content</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. ...</p>
    <h2>About Domain.com</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. ...</p>
  </body>
</html>
  

Back to top

Why am I receiving the error "Ad response does not contain a valid ad type"?
This error generally appears because no ads have been targeted to the specific publisherId (for the given time period). This condition may vary throughout the day, or over several days as campaigns begin and end. You should check that the ad you wish to target has not expired and that the ad targeting criteria are correct. As long as ads are properly requested, received, and rendered using the test publisherId, you can be sure that these ads will be properly handled using your live publisherId when the ads are available.

Back to top

Do you have a DFP video ad tag that I can use for testing?
http://pubads.g.doubleclick.net/gampad/ads?sz=400x300&iu=%2F6062%2Fiab_vast_samples&ciu_szs=300x250%2C728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&correlator=[timestamp]&cust_params=iab_vast_samples%3Dlinear

Should I set the adSlotWidth and adSlotHeight to the same values as the sz in my DFP ad tag?
Not necessarily. The adSlotWidth and adSlotHeight must be set to the width/height of the player or area you want your ads to fill. They are used by AdSense to determine which ads are available to fit into that space. The sz key/value pair in your DFP ad tag is a targeting parameter and does not necessarily affect the creative served (more information below).

Back to top

Why doesn't anything happen when my ad tag doesn't have anything trafficked to it?
Verify that you are listening for the AdErrorEvent.AD_ERROR event. This event is raised when there aren't any ads available. Listen for this event and call your content video when it is raised.

Back to top

The demo ad tag looks great, but when I switch it with my ad tag, no ad appears.
Check to ensure that something is trafficked to the ad tag you are requesting. The easiest way to find out is to watch the HTTP traffic. If a 1x1 pixel grey.gif image is returned within an HTML anchor block, then you will need to check your targeting in DFP.

Back to top

I want to request ads using the same tag more than once, but I only get ads for my first request. How do I fix this?
When you request ads more than once, you need to let the ad server know that these are legitimate requests, and not accidental duplicates. The SDK will do this for you with two quick API calls:
  1. Call destroy() on your AdsManager instance. You'll get a new AdsManager when you make your next request, and for that to work properly, you need to first dispose of the old one.
  2. Call contentComplete() on your AdsLoader instance. This resets the SDK so the new ad request doesn't look like a duplicate of the previous one.
After making the two calls above, you can call requestAds() on your AdsLoader instance to get another set of ads to play for your new video.

Back to top

How do I request overlay and full slot AdSense ads using the IMA SDK?
To request AdSense ads using the SDK, you need to first obtain an AdSense ad tag. You can learn more about that on the AdSense for Video page. Once you have your tag, you need to take the following steps to make either an overlay or a full slot ad request:
Overlay ads
  1. In your AdsRequest, set your ViewModes to NORMAL.
  2. In your ad tag, add the parameter overlay=1.
Full slot ads
  1. In your AdsRequest, set your ViewModes to FULLSCREEN.
  2. In your ad tag, add the parameter overlay=0.

Back to top

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.