Monetization on sites

  1. How to place Yandex Advertising Network adaptive units

Before connecting the Yandex Advertising Network to Adfox, you need to add your website or app in the Yandex Advertising Network interface. Once added, the resource is automatically sent for moderation.

Note. Mandatory conditions for placing Yandex Advertising Network units:

After your resource passes moderation in the Yandex Advertising Network, you can connect the Yandex Advertising Network to Adfox:

  1. Go to the Monetization → Display advertising tab and select the placement to link the ad unit to:

    • The placement in all sections: find the line with the desired placement (determined by the banner type and location). The unit will be linked to the placement in all sections where it's created. You can disable some sections. Hover over the placement and click in the YAN block ID column.
    • Placement in one section: click Show sections to the right of the list of placements. You'll see the names of the sections where there's a placement. Hover over the selected section and click in the YAN block ID.
  2. In the window that opens, select a site in the Yandex Advertising Network to create an ad unit on and click Select. A special ad unit is created on the site for Adfox.

    Attention. You can only create ad units through the Adfox interface. You can't link an existing Yandex Advertising Network ad unit to a placement in Adfox.

    For placements with the AMP and Turbo banner types, you can also create ad units. They're created and set up in the same way as on other placements, but a Yandex Advertising Network site should have the appropriate option enabled: Turbo pages or AMP pages.

    If there is no suitable site in the menu, click Create a new platform in the Yandex Advertising Network and follow the system instructions. For more information, see the Yandex Advertising Network Help.

  3. The Yandex Advertising Network interface opens. Fill in the required fields, add advertising formats to the ad unit, and set up a display strategy. Click Create.

  4. After saving the ad unit, you'll see its ID in the Adfox interface in the YAN block ID field. This means that the Yandex Advertising Network is connected to the Adfox placement.

You can edit units both in the Adfox and Yandex Advertising Network interfaces.

You can delete units in the Adfox interface. In this case:
  • The Yandex Advertising Network unit placement is removed.
  • The unit remains in the Yandex Advertising Network interface.
  • Statistics for the unit remains available.

How to place Yandex Advertising Network adaptive units

The display of Yandex adaptive ads requires special settings of the unit and container that this unit belongs to. Below we'll tell you what adaptive ads on Yandex are and how to place them properly on a website.

Ad adaptability is the property of an ad unit to change its size depending on its content and container parameters. A unit usually occupies the entire width of a container, and its height is determined by both the height of the container and the design of the ad and the number of elements. This lets you display video ads and images without cropping them, and flexibly combine ad elements depending on the user.

The larger the size range that a container provides to a unit, the more adaptive an ad will be. This way you can display ads of different sizes for different devices and avoid inconsistencies between the size of an ad and the size of the screen.

Basic criteria for adaptive ads on Yandex:

  • A unit blends seamlessly into the width: in the mobile version it corresponds to the width of the content or 100% of the screen, and in the desktop version, it's placed on the side panels to the right and left of the content.
  • An ad unit has a dynamic height and fits in a vertical container (the width is less than the height), which determines the adaptability of ads.

Please note that adaptive ads may cause content to shift when loading the page. Below are recommendations on how to properly place and set up an ad unit to minimize the impact of adaptive ads on the user experience, including the CLS metric.

Recommendations for using adaptive units

To ensure that adaptive ad units are displayed correctly and have a minimum impact on the user's perception of a website, follow these recommendations:

  • Place adaptive ads where they're less likely to cause shifts in content:

    • Don't add adaptive ads to the first screen. When absolutely necessary, place an ad at the bottom of the screen so that the ad unit ends outside the viewable area. We recommend installing adaptive units on the second and subsequent screens.
    • Don't add adaptive ads above the page header. In this case, use fixed containers.
  • The width of an adaptive unit should correspond to the width of the content in the layout (its width should be close to 100%).
  • Don't fix the height of adaptive units. Set the max-height in the unit code to at least 70 vh and no more than 90 vh. This will help you avoid situations when adaptive ads exceed the screen height or are greatly reduced on large displays. Learn more about unit height limits in the Yandex Advertising Network Help.
  • Add a placeholder. A placeholder is a container inside an ad unit that takes up space in the layout until an adaptive ad is displayed. To immediately reserve a place, add a placeholder to the ad tag.

    Required placeholder parameters:

    • Height that is equal to the height used in the sets of Dynamic monetization settings, Header Bidding banners, and direct campaign banners, or that is calculated with the formula: ad unit max-height × 0.9.
    • class="adfox_placeholder".
    This will prevent content shifting when adaptive ads load and minimize their impact on your website's CLS.
    Sample ad tag with a placeholder
    <!-- Yandex.RTB R-I-677833-1 --> 
    <div id="yandex_rtb_R-I-677833-1" style="max-height: 80vh;"> // an adaptive unit with the maximum height  
      <div style="height: 72vh;"></div> // a placeholder
    </div> 
    <script>window.yaContextCb.push(()=>{ 
      Ya.Context.AdvManager.render({ 
        renderTo: 'yandex_rtb_R-I-677833-1', 
        blockId: 'R-I-677833-1' 
      }) 
    })</script>

    The design of a placeholder can be styled to conform to your website so that its background matches the main website design before loading adaptive ads.

Contact support