Placing an ad block above or under the header
To monetize Turbo pages, you can include Yandex Advertising Network ad blocks or ads from other systems using Adfox.
On the desktop Turbo page, you can only place one block either above or under the header.
Restrictions:
- Above the header: Up to 250 pixels high.
- Under the header: Up to 1068 pixels wide and up to 250 pixels high.
Follow these steps to enable ads:
Step 1. Create an ad block
To create an ad block:
- Open the Yandex Advertising Network interface.
- Go to Add an RTB block.and click
- On the second step of creating the RTB block, select Desktop Turbo pages and click Next.
Customize Yandex.Direct ad formats and media advertising.
Restrictions:
- Above the header: Up to 250 pixels high.
- Under the header: Up to 1068 pixels wide and up to 250 pixels high.
- Copy the ID of the created block and use it when connecting ads. ID has the R-A-123456-7 format.
In Adfox, create a platform for Turbo pages.
To add ads to Turbo pages, you need an embed code.
- Go to thetab.
- Copy the code starting with the div element.
Code example
<div id="container ID"/>
<script>
window.Ya.adfoxCode.create({
ownerId: 123456,
containerId: 'container ID',
params: {
pp: 'g',
ps: 'cmic',
p2: 'fqem'
}
});
</script>
Where do I find the embed code?
Step 2. Activate and check
Attention. Yandex Advertising Network ad block formats are validated when they are enabled. If a block is the incorrect size, the ad isn't displayed.
The Adfox formats aren't validated. Debug the ad display yourself before enabling desktop Turbo pages.
To connect an ad block:
- In Yandex.Webmaster, go to Ads on desktop section.and scroll to the
- Under Ad block above the header or Ad block under the header, click Add and choose the ad block type.
- Depending on the block type, enter the block ID in the YAN field or the embed code in the Adfox field.
- If you add several ad blocks, put them in the display priority order using the icon. The order will be taken into account when placing ads.
- Check the ad display on the sample Turbo page.
- Save your changes.