Developer resources

Add Smart Banner for apps

Support for Smart Banners is deprecated. Consider trying Adaptive Banners, the latest responsive ad format that may offer improved performance over Smart Banners.

The Smart Banner size for ad units allows publishers to display a banner ad that aims to fill screen width with a fixed height. With Smart Banners, developers don’t need to offer a fixed size for their ad unit; they simply specify that the ad unit fill the width of the screen. Because Smart Banners only fill screen width, they aren't as flexible as Adaptive Banners and may not perform as well.

The Google Mobile Ads SDK has built-in support for Smart Banners and will fill the creative according to the following:

  • If the ads are coming directly from Google Ad Manager, any extra width in the banner view will be transparent.
  • If the ads are backfilled from Ad Exchange, gray tiling will be added to the creative as necessary to fill the entire width of the banner view. For example, if the ad view is 360x50, a 320x50 creative will be padded with 20px wide gray tiling on the left and right.

Read the following to learn how to create Smart Banner ad units, how the ad height is determined, how Smart Banners work with backfill, and more.

Support for Smart Banners is deprecated

Smart Banners are only supported for standard banner calls and Mediation. Use of Smart Banners with other features, such as Native ads, is not supported. The Smart Banner ad unit size doesn't work with interstitials
Note: Programmatic Direct campaigns support Smart Banners.

Create an ad unit with the Smart Banner size

  1. Create an ad unit as you normally would and select Smart Banner from the "Size mode" drop-down.
  2. In the app, use one of the following ad sizes for the ad view:
    • iOS: kGADAdSizeSmartBannerPortrait or kGADAdSizeSmartBannerLandscape
    • Android: SMART_BANNER
    The Google Ad Manager tag generator only creates mobile app ad tags for Smart Banner ad units because they're for apps only.
  3. Google Ad Manager matches all line items that fit both of the following:
    • Have a height equal to the requested height.
    • Have a width that fits into this equation:
      (requested width / 2) <= creative width <= requested width
      For example, creatives sized between 180x50 to 360x50 would be eligible to serve to a 360x50 Smart Banner request. 
Don't use fixed sizes with Smart Banners because the buyer can't respond to both bid requests.

Ad height

The height of your ad is based on your device's height, as the following table indicates:

Device height Ad height
h < 400 dp 32 dp
400 dp <= h < 720 dp 50 dp
h >= 720 dp 90 dp

Height is dependent on the device’s current orientation. In general, you'll see:

  • 50 dp height on portrait phones.
  • 32 dp height on landscape phones.
  • 90 dp height on 10-inch tablets and iPads in both orientations.
  • 90 dp height on portrait for most Android 7-inch tablets.
  • 50 dp height on landscape for most Android 7-inch tablets.

Developer documentationLearn more in the banner ad developer documentation for Android and iOS.

Backfill for Smart Banners

Ad Manager doesn’t support validAdSizes in backfill for Smart Banners. When you set multiple size requests, the backfill size is detected by the Google Mobile Ads SDK.

Developer documentationLearn more in the banner ad developer documentation for Android and iOS.

Ad Exchange line items can target Smart Banner size ad units. The line items should be defined with fixed sizes that are within the size range Ad Manager uses to match line items. Line items must fit both of the following:

  • Have a height equal to the requested height.
  • Have a width that fits into this equation:
    (requested width / 2) <= creative width <= requested width
    For example, creatives sized between 180x50 to 360x50 would be eligible to serve to a 360x50 Smart Banner request. 

Smart Banners don’t support ad unit-level backfill for AdSense. This type of backfill requires a fixed size ad unit, so it doesn’t work with Smart Banners. Instead, you can use line item backfill for AdSense/Ad Exchange to target a Smart Banner-sized ad unit. Choose a fixed size on the line item to ensure eligible creatives are served to the Smart Banner ad unit. For backfill creatives to be eligible, the size you choose should be at least 50% of the width of the Smart Banner slot and the same height.

For example, if you set up an ad unit with the Smart Banner size and target it with an Ad Exchange line item with fixed size 320x50, only requests made to that ad unit from devices with height between 400 dp and 720 dp will be eligible to be backfilled with 320x50 ads. When the SDK renders a backfilled 320x50 ad, it will fill the gap between the 320 dp creative and the remaining unfilled banner view space (if any).

Common issues

Below are solutions to issues that can arise while using Smart Banners.

Smart Banner ads are not delivering

Verify that there are active line items that are eligible to serve, and that your developer has correctly implemented the AdSize.SMART_BANNER size using the Google Mobile Ads SDK. You can verify this by ensuring the smart_w and smart_h parameters are included in the ad request.

When Smart Banner is activated for a particular ad slot, the SDK will automatically detect the size of the mobile device and include that size in the ad request. All line items and creatives with the following sizes will become eligible to serve:

  1. Have a height matching the requested height.
  2. Have a width greater than or equal to half the requested width and less than or equal to the requested width. For example, creatives sized between 180x50 to 360x50 would be eligible to serve to a 360x50 Smart Banner request.

Smart Banner ads are not centered

When an image ad doesn’t take up the entire allotted space for the banner, the image will be centered. If your ads do not center, verify that the creative’s true size matches the target size in Google Ad Manager. For example, if you configured a size override of 320x50 on a 360x50 creative, the SDK will render a 360x50 ad view to display the 320x50 creative. You should create a separate creative for each individual size.

 

Was this helpful?

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