Configuring unit sizes
Whether you can configure sizes for ad units depends on which type they are:
-
Banner: You can configure banner sizes in both your site layout and the Yandex Advertising Network interface. We recommend setting up container sizes on the site and selecting the Adaptive size in the interface. That ensures that the banner size is determined by the container size.
When setting up container sizes, we also recommend enabling dynamic banner adaptability, which is flexible resizing depending on the unit contents, user device, and site content. Read more about dynamic adaptability below.
-
Floor Ad: Ad unit sizes are determined automatically depending on the screen size and the site version. You can set additional size limitations in the Yandex Advertising Network interface. Set minimum and maximum values for the Adaptive with limitations size and fixed values for the Fixed size. You can limit the width and height for the site's mobile version and only the width for the desktop version.
-
Top Ad: Ad unit sizes are determined automatically depending on the screen size. You can set additional height limitations in the Yandex Advertising Network interface: a minimum and maximum height for the Adaptive with restrictions size and a fixed height for the Fixed size.
-
Fullscreen, Rewarded, and Feed: Ad unit sizes are determined automatically depending on the screen size. You don't need to manually adjust the sizes.
How to configure sizes in the Yandex Advertising Network interface
Go to the Ads on websites → Ad units tab, select a unit, and click Edit. Under Ad unit display settings, select a size:
-
Adaptive: The unit size is limited only by the size of the framing container on the site. The size of the container depends on the unit type:
BannerFloor AdTop AdMake sure to specify the size of the enclosing container in the site layout since that determines the ad formats that can be served in the unit. Read about determining container sizes in the recommendations below.
The container is created automatically:
-
In the desktop version, the container width is equal to the screen width and the container height is 90 pixels.
-
In the mobile version, the container width is equal to the length of the short side of the screen and the container height is 15% of the long side of the screen.
The container is created automatically:
-
The container width is equal to the length of the short side of the screen.
-
The height of the container is 50 – 100 pixels.
-
-
Adaptive with limitations: Enables you to set the maximum and minimum values for the unit height and width in pixels. In that case, when ads are selected, both the size of the container on the site and the limitations set in the Advertising Network interface are taken into account.
If the minimum value is not set, the ad for the desktop Floor Ad unit occupies 90 pixels in height and no more than the specified maximum value in width. These are the default values. For all other units: at least 40% of the container in height and 70% of the container in width.
-
Fixed: Enables you to determine the exact unit size in pixels. The unit will only display ads of the specified size (provided that the unit size is smaller than the size of the container on the site).
Alert
The sizes will be applied to all formats within the unit.
When selecting the Adaptive with limitations and Fixed sizes, take into account the size requirements of fixed display ad formats. To display these formats, the unit size must exactly match or exceed the size of the display banner.
Read more about size requirements depending on the ad format below.
Recommendations for configuring unit sizes
-
For a Banner unit, select Adaptive size and configure the width and height of the unit in the site layout by setting the size of the container the ad is in. For nondimensional containers, you can set the maximum height as a percentage of the viewport height (vh). To learn how to do this, see Height restriction in banners.
You can also set dynamic banner adaptability so you can resize the unit depending on its contents, the user device, and site content. That's particularly important if you're going to use the same unit for different site versions. Read more about dynamic adaptability below.
-
When determining the container size in the layout or setting up constraints in the Yandex Advertising Network interface, consider the ad formats you're planning on serving in the ad unit. To get the maximum revenue, we recommend displaying all available formats: Text & Image ads, display and video ads.
-
Take into account the size requirements of different ad formats:
Display ads (fixed)
Fixed display banners have strictly set sizes.
List of display banner sizes
Horizontal
Vertical
With adaptive width
- 300 × 250
- 320 × 50
- 320 × 100
- 320 × 480
- 336 × 280
- 480 × 320
- 728 × 90
- 970 × 90
- 970 × 250
- 1000 × 120
- 160 × 600
- 240 × 400
- 240 × 600
- 300 × 300
- 300 × 500
- 300 × 600
- 320 × 480
- 100% × 90
- 100% × 120
- 100% × 180
- 100% × 200
- 100% × 250
Advertisers especially often use banners of the following sizes:
300 × 250
300 × 300
320 × 50
320 × 100
240 × 400
We recommend setting the sizes of the container and the unit in such a way that at least one of these banners fits into the specified sizes.
A fixed banner must fully fit into the sizes of the container or unit:
-
If you choose the Adaptive size in the unit settings, a banner is selected based on the size of the container on the site. From the entire list of available banners, you will see those that fit exactly into the container or occupy most of the area: at least 40% in height and 70% in width (for desktop Floor Ad units, 90 pixels in height and no more than the specified maximum value in width).
Example
Fixed 300 × 300 and 300 × 250 banners can be displayed in a 300 × 300 container. Banners of other sizes are not selected.
-
If the Adaptive with limitations size is specified in the unit settings, then when a banner is selected, both the size of the container on the site and the limitations set in the Advertising Network interface are taken into account. From the entire list of available banners, those banners that fully fit into the final size range will be displayed.
Example
The following limitations are set in the unit settings: unit width must be 100 – 320 pixels and unit height must be 50 – 300 pixels. In that case, banners of 300 × 250, 300 × 300, 320 × 50, and 320 × 100 pixels can be displayed in the unit.
If the minimum sizes are not set, the condition applies when selecting the banner: it must occupy at least 40% of the container in height and 70% in width (for desktop Floor Ad units, 90 pixels in height and no more than the specified maximum value in width). This is necessary to avoid displaying banners that are too small in the unit.
Example
Only the maximum values are set in the unit settings: width must not exceed 320 pixels and height must not exceed 300 pixels. In that case, only banners of 300 × 250 and 300 × 300 pixels can be displayed in the unit.
-
If the Fixed size is specified in the unit settings, only those banners whose size exactly matches the specified unit size will be displayed. For example, if the unit size is 320 × 300 pixels, fixed banners will not be displayed (since there are no banners of this size).
Adaptive display ads and Text & Image ads
Can be displayed in a unit of any size. For more information about placing adaptive ads, see How to place a banner on a site.
Video ads
Can be displayed if the unit size is not less than 320 × 180 pixels. To display additional video ad elements (favicon, logo, domain, title, CTA button), the container size requirements are higher:
-
320 × 220 pixels: For horizontal videos.
-
240 × 280 pixels: For square videos.
-
180 × 360 pixels: For vertical videos.
How to use dynamic adaptive ads in Banner
Dynamic adaptability is the ad unit's ability to change its size depending on the content and container parameters. The unit's width usually fills the container's width, while the unit's height is determined by the container height as well as the ad's design and the number of elements it has. This lets you show video and image ads without cropping them as well as dynamically combine elements depending on the user.
The wider the size range allotted to the unit by the container, the more adaptive the ad is. That lets you display different size ads on different device types and avoid inconsistencies between ad sizes and screen dimensions.
Basic dynamic adaptability criteria with Yandex:
-
The ad unit fits the width. In the mobile version, it corresponds to the content width or 100% of the screen. In the desktop version, it's placed in the side panels to the right and left of the content.
-
The ad unit has a dynamic height (it isn't fixed) and fits a vertical container (the width is less than the height), which is what determines ad adaptability.
Note that adaptive ads may offset content while the page is loading. Below you can find our recommendations on how to place and set up ad units so they don't affect user experience (CLS and other metrics).
Recommendations for using dynamic adaptive units
Here's how to ensure that dynamic adaptive units are displayed correctly and don't affect user perception of the site:
-
Place dynamic adaptive ads where they are least likely to offset content:
-
Don't place dynamic adaptive ads on the first screen. If you have to, place it at the bottom of the screen, so that the ad unit ends outside the visible area. We recommend placing dynamic adaptive units on the second and subsequent screens.
-
Don't add dynamic adaptive ads above the page header. Use fixed containers in these cases instead.
-
-
The width of dynamic adaptive units should match the width of the content in the site layout (note that the width of the content in the site layout should be close to 100%).
-
Don't fix the height of dynamic adaptive units. Set the maximum height
max-height
in the unit code to at least 70 vh and no more than 90 vh. That way, you avoid issues where the height of an ad exceeds the screen size or is too small for large displays. Learn more about unit height restrictions -
Add placeholders. Placeholders are containers inside ad units that fill the space in the layout until the ad is displayed. Add your placeholders to the ad code so that their locations are preset. The recommended height for a placeholder is calculated via the formula:
max-height
of an ad unit × 0.9. That way, you can avoid content offset as adaptive ads are loading and minimize the ad impact on your site's CLS.Sample code for calling a dynamic adaptive ad with a placeholder
<!-- Yandex.RTB R-I-677833-1 dynamic adaptive unit with maximum height --> <div id="yandex_rtb_R-I-677833-1" style="max-height: 80vh;"> <!-- placeholder --> <div style="height: 72vh;"></div> </div> <script>window.yaContextCb.push(()=>{ Ya.Context.AdvManager.render({ renderTo: 'yandex_rtb_R-I-677833-1', blockId: 'R-I-677833-1' }) })</script>
The placeholder design can be customized to your site such that the background blends in with the design until the ad loads.
-
Place dynamic adaptive ads where they are least likely to offset content:
-
Don't place dynamic adaptive ads on the first screen of your site pages. We recommend placing ad units on the second and subsequent screens, to the left or right of the content.
-
Don't place dynamic adaptive ads above the page header or within the content space. Use fixed containers for cases like that instead.
-
-
Use dynamic adaptive height for units with a maximum width of 400px.
-
Don't fix the height of dynamic adaptive units. Set the maximum height
max-height
in the unit code to at least 40 vh and no more than 60 vh. That way, you avoid issues where the height of an ad exceeds the screen size or is too small for large displays. Learn more about unit height restrictions -
Add placeholders. Placeholders are containers inside ad units that fill the space in the layout until the ad is displayed. Add your placeholders to the ad code so that their locations are preset. The recommended height for a placeholder is calculated via the formula:
max-height
of an ad unit × 0.9. That way, you can avoid content offset as adaptive ads are loading and minimize the ad impact on your site's CLS.Sample code for calling a dynamic adaptive ad with a placeholder
<!-- Yandex.RTB R-I-677833-1 dynamic adaptive unit with a maximum height --> <div id="yandex_rtb_R-I-677833-1" style="max-height: 60vh;"> <!-- placeholder --> <div style="height: 54vh;"></div> </div> <script>window.yaContextCb.push(()=>{ Ya.Context.AdvManager.render({ renderTo: 'yandex_rtb_R-I-677833-1', blockId: 'R-I-677833-1' }) })</script>
The placeholder design can be customized to your site such that the background blends in with the design until the ad loads.
Contact support
Write to WhatsApp
Go to WhatsAppWhen you're configuring the Fixed size, dimensions with adaptive width will be available if you only enter the height.