Units for AMP
You can use Yandex Advertising Network units to monetize AMP (Accelerated Mobile Pages).
Yandex Advertising Network units placed on AMP pages can display:
To place a Yandex Advertising Network unit:
-
In the Yandex Advertising Network interface, create a Banner unit. In the unit settings, be sure to select AMP in the AMP field.
-
Get the embed code: in the unit settings, click Get code.
-
Make changes to the site page's code:
In-page unit
-
Add the script with the amp-ad component to
<head>
. -
Copy the ad unit code to the clipboard and paste it in the place where you plan to display the unit.
-
Change the
height
parameter value to the height you set for the ad unit. In the embed code, the default height is 320 pixels.
Floor Ad unit
-
Add the script with the amp-sticky-ad component to
<head>
. -
Wrap the ad unit code with the following tags:
<amp-sticky-ad layout="nodisplay"> // ad unit code </amp-sticky-ad>
-
Configure the ad unit parameters:
-
width
: Width in pixels. -
height
: Height in pixels (maximum value: 100). -
Delete the
layout="fixed-height"
parameter.
-
-
Paste the code into the site page in the place where you plan to display the unit.
Example of a Floor Ad embed code
<amp-sticky-ad layout="nodisplay"> <amp-ad width="350" height="100" type="yandex" data-block-id="R-A-123456-1" data-html-access-allowed="true"> </amp-ad> </amp-sticky-ad>
Another type of unit
You can place banners into various types of units in accordance with the AMP documentation requirements.
-
Note
The unit code for AMP pages is different from the unit code for other site versions. If you place this unit on a regular site, there won't be any impressions.