Inline adaptive banner ads

Select platform: Android Android (beta) iOS Flutter

Adaptive banners let you specify the width of an ad to determine the optimal ad size. Adaptive banners also maximize performance by optimizing the ad size for each device. This approach results in opportunities for improved performance.

Compared to anchored adaptive banners, inline adaptive banners are larger, taller, and use variable instead of fixed heights. Inline adaptive banners are of variable height, and might encompass the entire screen or a maximum height that you specify.

You place inline adaptive banners in scrolling content, for example:

Diagram showing differences in adaptive and inline adaptive banners

Before you begin

Before continuing, make sure you have completed the getting started guide, Banner ads.

Implement adaptive banners

Unlike anchored adaptive banners, inline adapter banners load using an inline adaptive banner size. To create an inline adaptive ad size, complete the following:

  1. Get the width of the device in use, or set your own width if you don't want to use the full width of the screen.