Getting your website ready
The widget only parses content from websites that are displayed in Yandex search and connected to YAN as a content site or its mirror. This means that websites banned in Yandex search will not be displayed in the recommendation widget.
The widget is updated with new content within two hours after it's been created. However, this might take longer if you register a brand new YAN domain before creating your widget.
The search robot analyzes page markup before picking the elements to upload into the widget. If the page has metatags for the YAN recommendation widget, OpenGraph, or Schema.org, the robot parses their information based on a priority system described below. If no special tags are found, the robot tries to extract information from other elements present on the page, although this might not always yield the most accurate results. However, by marking the page up with metatags from the YAN recommendation widget, you can get more control over this process.
Tag priority order
The robot picks page elements based on their priority order. First, the robot picks elements with the highest priority level. If no such elements are found, the robot picks elements with the second-highest priority level and so on.
- The
yandex_recommendations_title
metatag used in the YAN recommendation widget. Example:<meta property="yandex_recommendations_title" content="World's best football players"/>
- The
og:title
metatag. Example:<meta property="og:title" content="World's best football players in 2019" />
- Other available elements, such as
<title>
. - The
yandex_recommendations_image
metatag used in the YAN recommendation widget. Example:<meta property="yandex_recommendations_image" content="https://example.com/image.jpg"/>
- The
og:image
metatag. Example:<meta property="og:image" content="https://example.com/image.jpg"/>
- Other available elements, such as
<image>
. - The
og:type
metatag with the objectarticle:published_time
. Example:<meta property="og:type" content="article"/> <meta property="article:published_time" content="2020-11-26T12:56:36+0300"/>
- A metatag with the
itemprop
attribute anddatePublished
data type. Example:<meta itemprop="datePublished" content="2020-11-26T12:56:36+0300"/>
- Other available elements.
Element priority:
Element priority:
Element priority:
Reasons to use metatags from the YAN recommendation widget
yandex_recommendations_image
or og:image. Without them, images take longer to process, which is why content containing such images may not make it into the widget in time.Using the YAN recommendation widget metatags lets you do the following things:
- Change recommendation titles. By default, the titles in widget cells are determined automatically by the robot based on page analysis. However, you can set a title manually (for example, by making the title of a publication shorter).
- Change the image used for a recommendation. By default, the images in widget cells are determined automatically by the robot based on page analysis. If you want to be sure the robot picks the correct image, add the tag
yandex_recommendations_image
or og:image to your image. - Add a content category to a widget cell. This will make it easier for users to find the right recommendation. Keep in mind that you need to add metatags if you want content categories displayed in the widget.
- Filter content displayed in the widget using special tags.
Recommendation widgets are updated after each robot crawl. The robot doesn't take much time when adding new pages. However, it takes longer to add pages after making edits to them (including changes to their markup). For such cases, we recommend reindexing the page in Yandex.Webmaster.
List of YAN recommendation widget metatags
Metatag | Description |
---|---|
yandex_recommendations_title Example
| Lets you set a title exclusively for display in the widget (for example, by making the page title shorter). |
Example | Lets you allocate categories to your content, such as \"science\", \"sports\", or \"adult\". Category names can't be more than 128 characters long and can't include commas or the following characters: If your document's metatags include some content category, the category will be displayed in the widget cell specified in the design template. If metatags include multiple categories, they will be all displayed in the widget in a single line separated by commas. You should use tags instead of categories for filtering content. |
yandex_recommendations_tag Examples | Lets you filter content. You can use this for:
You have to come up with your own name for a tag. You can use Latin letters, numbers, underscores, and dashes. The maximum name length for metatags is 128 characters. You can add up to 64 metatags. |
yandex_recommendations_image Example | Lets you choose an image to display in the widget. |
yandex_recommendations_kill Example | Used for excluding pages from the widget. If you can't manually specify a path to sections you wish to exclude, you can use this metatag instead. |
Metatag | Description |
---|---|
yandex_recommendations_title Example
| Lets you set a title exclusively for display in the widget (for example, by making the page title shorter). |
Example | Lets you allocate categories to your content, such as \"science\", \"sports\", or \"adult\". Category names can't be more than 128 characters long and can't include commas or the following characters: If your document's metatags include some content category, the category will be displayed in the widget cell specified in the design template. If metatags include multiple categories, they will be all displayed in the widget in a single line separated by commas. You should use tags instead of categories for filtering content. |
yandex_recommendations_tag Examples | Lets you filter content. You can use this for:
You have to come up with your own name for a tag. You can use Latin letters, numbers, underscores, and dashes. The maximum name length for metatags is 128 characters. You can add up to 64 metatags. |
yandex_recommendations_image Example | Lets you choose an image to display in the widget. |
yandex_recommendations_kill Example | Used for excluding pages from the widget. If you can't manually specify a path to sections you wish to exclude, you can use this metatag instead. |
Adding tags used in the YAN recommendation widget
<head>
section and add metatags as follows:
<head>
...
<meta property="yandex_recommendations_title" content="Regional sports news"/>
<meta property="yandex_recommendations_category" content="Sport"/>
<meta property="yandex_recommendations_image" content="https://example.com/image.jpg"/>
<meta property="yandex_recommendations_tag" content="tag_1"/>
...
</head>