Creating RTB blocks

Real-Time Bidding ad blocks can display both contextual (content-based) ads and media ads.

Visual code designer

You can use the visual code designer to create blocks in the Yandex Advertising Network interface. The designer lets you specify the ad format, select the appearance of your ad block, and configure it to match the design of your site.

To create a new RTB block, go to the list of RTB blocks (Products → RTB blocks), and click Add an RTB block.

Step 1. General

Select a platform from the list where the block will be displayed, and name your block. Specify the privacy level.

Step 2. Site version
Select the site version that you would like to create an ad block for. The available formats vary depending on the version:
  • Desktop. You will be able to select from the maximum set of formats that are suitable for display on desktop computers, laptops, and tablets.
  • Mobile — special formats that are suitable for being displayed on mobile phones and smartphones.
  • Turbo pages — special ad block formats that are suitable for sites that use the Turbo technology. Turbo pages cannot be used to display ad blocks in other formats (for example, for mobile versions of your site).
  • AMP pages — special ad block formats that are suitable for sites that use the Accelerated Mobile Pages (AMP) technology. AMP pages cannot be used to display ad blocks in other formats (for example, for mobile versions of your site).
Step 3. Direct

Select a form factor: vertical or horizontal. A list of formats will display all suitable ad block formats (for more information, see types and formats of RTB blocks). For flexible blocks (with the exception of square ones), you need to set the maximum number of Yandex.Direct ads yourself. Specify the width and height of a custom block.

Configure the visual design of Yandex.Direct ads in the block: select the font type and size, the color palette, and the shapes of corners and borders. All changes to settings are immediately displayed in the test block. The design of your ad block significantly influences the CTR and, consequently, your site revenue.

You can also add callouts and disable showing sitelinks and advertiser site icons in Yandex.Direct ads. Note that in accordance with the Terms of Participation, the “Yandex.Direct” link and the advertisers' domains must be clearly visible and easily distinguishable.

Step 4. Media ads

Set which formats of media ads can be displayed in the block. The list includes all formats that are compatible with the form factor selected in the previous step. Matching formats will automatically select additional formats (that can also fit this ad space) to the ones selected manually. Change the suggested list by selecting or deselecting formats.

The more formats you select, the more advertisers will be able to participate in the auction, and the more revenue you can generate.

Step 5. Strategy

Choose a traffic management strategy. You can also insert your own ad code to display ads from other advertising systems in the same ad space, or to insert a placeholder if there aren't any suitable RTB auction offers for showing an ad.


You cannot place the RTB ad block code inside the code of other ad banner systems (DFP, AdRiver, etc.). If you want to maximize your revenue by displaying ads from multiple ad systems, use the Yandex traffic share and CPM minimum threshold strategies. ADFOX customers can link their Yandex Advertising Network and ADFOX accounts and create RTB advertising blocks in the ADFOX interface.

Click Create.

Placing ad code on a website

Select Code execution type in the RTB embed code for the site (synchronous/asynchronous). You can also specify the statistical slice ID in the ad code.

Copy the JavaScript code and insert it into the HTML of your webpage in the place you would like to display the ads. Note that when copying code, your text editor might truncate or wrap long strings, which might cause the JavaScript code to run incorrectly. Make sure the code does not get modified during copying. The Copy to clipboard button is the best way to copy the code.

The ad block will be displayed within 30 minutes after saving the code and placing it on the website. The statistics for the block will start being collected immediately, but you'll have to accumulate a certain amount of data for the information to start showing in the interface.

Block ID

A unique ID will be assigned to the block after it is saved, and the block will be displayed in the list of RTB blocks. A block ID (ID) consists of a product ID (R-A), platform ID (page_id) and the block's serial number.


You cannot place blocks with the same IDs on the same page of the site.

If you want to create another block with the same settings, click Duplicate. The new block will be displayed in the list of RTB blocks.

Editing and configuring a block

To edit added blocks and use additional settings, go to the list of RTB blocks (Products → RTB blocks), find the block you need, and click Edit.