In page ads
To monetize your Turbo pages, you can enable the Yandex Advertising Network units or ads from other systems using Adfox.
Follow these steps to enable this type of ad:
Step 1. Creating an ad unit
- Go to Add RTB unit.and click
- In the second step of creating an RTB unit, select Turbo pages for mobile and click Continue.
- In the third step, select the Standard design.
- Select.
- Choose Adaptive
and click Save design.
- Set up the media ads.
- Set up the strategy and click Create. Learn more about strategy types.
- Copy the ID of the created unit and use it when enabling ads in Yandex Webmaster settings. The ID has the format R‑A‑123456‑7.
To display more than one ad on a page, create multiple ad units. You can duplicate the units.
In the Adfox interface, create a platform for your Turbo pages..
To place the ads on Turbo pages, you'll need the embed code.
- Click.
- Copy the code starting from the div element.
<div id="adfox_123456789123456789"></div>
<script>
window.yaContextCb.push(()=>{
window.Ya.adfoxCode.create({
ownerId: 123456,
containerId: 'adfox_123456789123456789',
params: {
pp: 'g',
ps: 'ezwy',
p2: 'gnhv'
}
})
})
</script>
Step 2. Enabling and checking
You can position units on the page manually or using automatic ad placement.
- In Yandex Webmaster, go to.
- Under Ad units in content, click Add and select the ad unit type.
- Depending on the unit type, enter the unit ID in the Yandex Advertising Network field or the embed code in the Adfox field.
- If you have specified multiple ad units, order them by display priority using the
icon. The order will be taken into account at ad placement.
- Save changes.
- Enter the information in.
- Delete the item turbo:adNetwork and its content from the RSS feed.
- Wait for the RSS file to update in Yandex Webmaster.
- In Yandex Webmaster, go to.
- In the Manual setup section, click Add and select the ad unit type.
- Depending on the unit type, enter the unit ID in the Yandex Advertising Network field or the embed code in the Adfox field.
- In the turbo-ad-id field, set an arbitrary ID, like first_ad_place.
- Save changes.
In the RSS feed, specify the placement position of the ad using the figure element. Add the data-turbo-ad-id attribute for this element with the ID value specified in the previous step.
<figure data-turbo-ad-id="first_ad_place"></figure>
Copied to clipboard- Go back toand check the ad display in the sample Turbo page.
If you enabled ads in the Yandex Webmaster interface, don't add ads to the RSS feed.
Pass information about ads using the turbo:adNetwork element:
Ad units supported:... <channel> ... <turbo:adNetwork></turbo:adNetwork> ... </channel> ...
Copied to clipboardExample of how to enable:<turbo:adNetwork type="Yandex" id="R-A-123456-7" turbo-ad-id="first_ad_place"> </turbo:adNetwork>
Copied to clipboardtype
*Type of ads. Accepts the value Yandex.id
*ID of the Yandex Advertising Network ad unit (for example, R-A-123456-7).turbo-ad-id
*ID indicating the placement position of the ad.* Required
Attention. Specify the Adfox embed code inside the turbo:adNetwork element. Wrap it with <![CDATA[]]>.<turbo:adNetwork type="AdFox" turbo-ad-id="first_ad_place"> <![CDATA[ <div id="container ID 1"></div> <script> window.Ya.adfoxCode.create({ ownerId: 123456, containerId: 'container ID 1', params: { pp: 'g', ps: 'cmic', p2: 'fqem' } }); </script> ]]> </turbo:adNetwork>
Copied to clipboardtype
*Type of ads. Accepts the value AdFox.turbo-ad-id
*ID indicating the placement position of the ad.* Required
- In the page content, specify the placement position of the ad using the figure element. Add the data-turbo-ad-id attribute for this element with the ID value specified in the turbo-ad-id attribute of the turbo:adNetwork element:
Example:
<figure data-turbo-ad-id="first_ad_place"></figure>
Copied to clipboardNote.If the turbo-ad-id attribute is not specified or its value is omitted, only the first ad unit is displayed at the bottom of the Turbo page.
If the turbo-ad-id attribute is specified only for a few ad units, the ad is not displayed.