Getting your website ready

Attention.

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.

  1. Tag priority order
  2. Reasons to use metatags from the YAN recommendation widget
  3. List of YAN recommendation widget metatags
  4. Adding tags used in the YAN recommendation widget

Why doesn't the widget show up on the page?

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.

Headline

Element priority:

  1. The yandex_recommendations_title metatag used in the YAN recommendation widget. Example:
    <meta property="yandex_recommendations_title"
                        content="World's best football players"/>
  2. The og:title metatag. Example:
    <meta property="og:title" content="World's best football players in 2019" />
  3. Other available elements, such as <title>.
Image

Element priority:

  1. The yandex_recommendations_image metatag used in the YAN recommendation widget. Example:
    <meta property="yandex_recommendations_image"
                        content="https://example.com/image.jpg"/>
  2. The og:image metatag. Example:
    <meta property="og:image" content="https://example.com/image.jpg"/>
  3. Other available elements, such as <image>.
Date of publication

Element priority:

  1. The og:type metatag with the object article:published_time. Example:
    <meta property="og:type" content="article"/>
    <meta property="article:published_time" content="2020-11-26T12:56:36+0300"/>
  2. A metatag with the itemprop attribute and datePublished data type. Example:
    <meta itemprop="datePublished" content="2020-11-26T12:56:36+0300"/>
  3. Other available elements.

Reasons to use metatags from the YAN recommendation widget

Note. You don't have to use metatags from the YAN recommendation widget. If no such tags are found, the widget is built based on data automatically collected by the robot. However, we still recommend you always use the tags 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

<meta property="yandex_recommendations_title"
                    content="World's best football players"/>
Lets you set a title exclusively for display in the widget (for example, by making the page title shorter).

yandex_recommendations_category

Example

<meta property="yandex_recommendations_category" content="Sports"/>

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: \n, \0, \t.

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

<meta property="yandex_recommendations_tag" content="first_tag"/>
<meta property="yandex_recommendations_tag" content="second_tag"/>
Lets you filter content. You can use this for:
  • Choosing content to upload into the widget based on tags.
  • Choosing content to exclude from the widget based on tags.

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

<meta property="yandex_recommendations_image"
                    content="https://example.com/image.jpg"/>
Lets you choose an image to display in the widget.
yandex_recommendations_kill

Example

<meta property="yandex_recommendations_kill" content="1"/>
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

Find your page's <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>