Microdata
Microdata is a markup method with data rendered as standard HTML elements.
Alert
If you embed micro markup using a plugin, you’ll probably need to modify it. To do this, contact the plugin developer or another professional with development skills.
Markup principles
To markup your content, add the itemscope
attribute to any tag that contains the entity being described. To indicate what kind of item it is, use theitemtype
attribute after the itemscope
and set it to the appropriate class in the itemtype="http://schema.org/<Class name>"
format. Entities can also be nested within each other. For example, you can specify that the content of a div
tag describes a news article (the NewsArticle
class), while that of a p
tag describes a person (the Person
class):
<div itemscope itemtype="http://schema.org/NewsArticle">
<h1>Moscow breaks the 1922 temperature record</h1>
<p itemscope itemtype="http://schema.org/Person">
Author: <span>John Smith</span> — <span>special correspondent</span></p>
<p>On Wednesday, November 6, Moscow broke the temperature
record registered in 1922. The air temperature was plus 12.1 degrees Celsius,
according to the Fobos center.</p>
</div>
To specify the properties of an item, use the itemprop
attribute. You can find the list of available properties in the description of the corresponding class on the standard’s website. In the example below, the NewsArticle
properties are used to mark elements describing the title of the article, its author and text, and the Person
properties are used to mark such elements as the author's name and position:
<div itemscope itemtype="http://schema.org/NewsArticle">
<h1 itemprop="headline">Moscow breaks the 1922 temperature record</h1>
<p itemprop="author" itemscope itemtype="http://schema.org/Person">
Author: <span itemprop="name">John Smith</span> —
<span itemprop="jobTitle">special correspondent</span> </p>
<p itemprop="articleBody">On Wednesday, November 6, Moscow broke the temperature
record registered in 1922. The air temperature was plus 12.1 degrees Celsius,
according to the Fobos center.</p>
</div>
Machine-readable information
When adding markup to your materials, you can use not only Schema.org items but also machine-understandable information. This information isn’t available to readers, but can be processed by browsers, search engines, and robots.
The meta tag
-
Sometimes important information can’t be marked up because of the way it appears on the page. For example, when information is conveyed in an image or a Flash object or when it isn’t explicitly stated on the page. In such cases, you can use the
meta
tag with thecontent
attribute. In the example below, themeta
tag and the properties of theArticle
class are used to indicate the topic of materials:<meta itemprop="about" content="Weather">
This technique should be used sparingly. Only use the
meta
tag with thecontent
attribute for information that cannot be marked up otherwise.Alert
In items with markup, Yandex. Metrica first looks for the value in the
content
attribute and then in the tag contents.
Date and time
-
You can use the
datetime
attribute of thetime
tag to record time. Dates are written in ISO 8601 format. The example below shows the date of10:30, November 6, 2018
, which is passed as2018-12-11T07:30:00Z
to a robot.<time itemprop="datePublished" datetime="2018-12-11T07:30:00Z"> 10:30, November 6, 2018</time>
What content can I mark up
Yandex Metrica supports markup for the following content:
- Article, news, or blog post (
Article
,NewsArticle
, orBlogPosting
) - Movie description (
Movie
) - Review or feedback (
Review
) Recipe
Question
Other types of content will not be included in Yandex Metrica reports even with the correct markup.
How to mark up materials
When marking materials, you can use both Schema.org entities and machine-readable data described above.
Add markup to your content following the rules below to make sure that it’s processed correctly by Yandex Metrica. To get more complete statistics, we recommend that you mark up all the content elements, but only three are required: identifier, headline, and text. If you already use Schema.org, see if the markup on your website meets these requirements. The code examples in the terms aren’t the only correct markup option.
Markup can be added to the site automatically — for example, using WordPress plugins. Before use, make sure that the selected plugin allows you to pass all the necessary markup elements to the page code.
We do not recommend using tag management systems for marking up your content because Yandex Metrica will not be able to correctly process the marked up data. However, such systems can be used for other purposes, such as installing a tag on a site.
Alert
All Schema.org items with markup must be inside the body
tag. If there are several content units on the page, each of them must be marked separately. It is important to meet these requirements so that statistics is collected correctly.
Select the type of materials:
For marking up articles, news articles, or posts, use any of the entities: Article
, NewsArticle
or BlogPosting
. Mark up the following content elements (mandatory elements are marked with an asterisk):
ID*
-
The ID is specified using the
identifier
property. It lets Yandex Metrica distinguish between different content. The ID isn’t shown in reports.<meta itemprop="identifier" content="12345">
You can also specify the ID using the
mainEntityOfPage
property. It's used if theidentifier
property isn't found. Yandex.Metrica searches it for theitemid
attribute value that will be used as the ID.<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="/life/weather/12345.html"/>
If none of the above properties is found, the top-level header from the
<h1>...<h6>
tags or thehref
attribute value of the canonical reference is used as the ID.
If multiple IDs are marked up, the first value found will be used.
Title*
-
You can specify the headline using the
headline
oralternativeHeadline
property. The headline will appear in Yandex Metrica reports. If both properties are set, their values are written with a space. For example, if the headlines are marked up like this:<h1 itemprop="headline">Moscow breaks the 1922 temperature record</h1> <h2 itemprop="alternativeHeadline"> Temperature in November exceeds 12 °C</h2>
In the report, the article is called “Moscow breaks the 1922 temperature record Temperature in November exceeds 12 °C”.
If none of the above properties is found, the value of the
name
property is used as the headline.
Text*
-
The text of an article should be contained in the tag with the
articleBody
property.The number of characters in the text is determined. This is necessary to determine the volume of material. Only the contents of nested tags is considered text. The characters in the actual tags aren’t taken into account. We recommend that you mark up the text of materials so that it doesn’t include what is unnecessary: ad banners, comment blocks, etc., otherwise the volume of materials and statistics indicators may be calculated incorrectly.
<p itemprop="articleBody"> On Wednesday, November 6, Moscow broke a temperature record registered in 1922. The air temperature was plus 12.1 degrees Celsius, according to the Fobos center. </p>
If the
articleBody
property isn't found, the values of thedescription
ortext
property are used as the text.If none of the properties are found, the contents of the tag marked
Article
orNewsArticle
, without tag characters, are used as the text.Note
You can get complete statistics for the content with text longer than 500 characters.
-
To specify the author, we use the
author
property. If there are multiple authors, specify them in different tags.<div itemprop="author">John Smith</div>
The value can also be taken from:
-
The
name
property of thePerson
class.<div itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">John Smith</span> </div>
-
The attribute of the
href
link.<link itemprop='author' href="/example/authors/john_smith.html"/>
With this data, you can view statistics for individual authors in Yandex Metrica.
-
Subject
-
You can mark up keywords or hashtags as topics. To do this, define the
about
property for each topic. You can use the value from thename
property of any class:<div itemprop="about">Heat</div> <div itemprop="about" itemscope itemtype="https://schema.org/Thing"> <span itemprop="name">Moscow</span> </div>
Dates of publication and revision
-
The dates of publication
datePublished
and revisiondateModified
are written in ISO 8601 format.<meta itemprop="datePublished" content="2018-12-11T08:56:49Z" />
or in the
datetime
attribute of thetime
tag<time itemprop="dateModified" datetime="2018-12-11T07:30:00Z"> 07:30, December 11, 2018 </time>
Category
-
A heading is a section of a website dedicated to a specific topic. To mark up a category, use the
BreadcrumbList
class. It describes a chain of linked web pages (“breadcrumbs”), which usually ends with the current content. Within theBreadcrumbList
, define multiple items of theListItem
type, which are marked up by theitemListElement
property and describe the current and broader headings.The nesting of categories is set using the
position
property of theListItem
class. For example, the “Life” category may contain nested categories like “Weather” and “Incidents”. Ifposition = '1'
, materials are at the upper level (“Life”), ifposition = '2'
— they are at the second level (“Weather”).The heading of materials will be the value of the
name
property of theListItem
entity with the largestposition
value.Note
At the moment, the statistics shows two levels of category nesting.
<ol itemscope itemtype="http://schema.org/BreadcrumbList"> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life"> <span itemprop="name">Life</span></a> <meta itemprop="position" content="1" /> </li> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life/weather"> <span itemprop="name">Weather</span></a> <meta itemprop="position" content="2" /> </li> </ol>
Content URL
-
The content URL is specified using the
url
property.<a itemprop="url" href="https://www.example-news.com/life/weather/moscow"> example-news.com</a>
If the
url
property is not found, the system searches for a canonical link. This link is used to indicate the main content, if the current page duplicates a site page. Canonical links are marked with a specialrel="canonical"
attribute. For example, if the content is a duplicate of the pagehttp://www.example-news.com/page
, it contains<link rel="canonical" href="http://www.example-news.com/page"/>
. The value of thehref
attribute of the canonical link is used as the material's URL.The found value can be used when generating the content ID.
If the markup is correct and the tag is properly enabled, statistics on the content will soon start to be collected in Yandex Metrica.
When marking up information about movies, use the Movie
item. Mark up the following content elements (mandatory elements are marked with an asterisk):
ID*
-
The ID is specified using the
identifier
property. It lets Yandex Metrica distinguish between different content. The ID isn’t shown in reports.<meta itemprop="identifier" content="12345">
You can also specify the ID using the
mainEntityOfPage
property. It's used if theidentifier
property isn't found. Yandex.Metrica searches it for theitemid
attribute value that will be used as the ID.<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="/life/cinema/12345.html"/>
If none of the above properties is found, the top-level header from the
<h1>...<h6>
tags or thehref
attribute value of the canonical reference is used as the ID.
If multiple IDs are marked up, the first value found will be used.
Title*
-
You can specify the headline using the
headline
oralternativeHeadline
property. The headline will appear in Yandex Metrica reports. If both properties are set, their values are written with a space. For example, if the headlines are marked up like this:<h1 itemprop="headline">Cloud Atlas</h1> <h2 itemprop="alternativeHeadline"> Cloud Atlas</h2>
in the report, the materials will be called “Cloud Atlas Cartographie des nuages”.
If none of the above properties is found, the value of the
name
property is used as the headline.
Text*
-
The text of content about the movie should be placed in the tag with the
description
property.The number of characters in the text is determined. This is necessary to determine the volume of material. Only the contents of nested tags is considered text. The characters in the actual tags aren’t taken into account. We recommend that you mark up the text of materials so that it doesn’t include what is unnecessary: ad banners, comment blocks, etc., otherwise the volume of materials and statistics indicators may be calculated incorrectly.
<p itemprop="description"> Six stories — five reincarnations that occur at different times are closely intertwined... </p>
If the
description
property is not found, the value of thetext
property will be used as the text.If the above properties aren't found, the entire contents of the tag marked
Movie
, without tag characters, is used as the text.Note
You can get complete statistics for the content with text longer than 500 characters.
-
To specify the author, we use the
author
property. If there are multiple authors, specify them in different tags.<div itemprop="author">John Smith</div>
The value can also be taken from:
-
The
name
property of thePerson
class.<div itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">John Smith</span> </div>
-
The attribute of the
href
link.<link itemprop='author' href="/example/authors/john_smith.html"/>
With this data, you can view statistics for individual authors in Yandex Metrica.
-
Subject
-
You can mark up keywords or hashtags as topics. To do this, define the
about
property for each topic. You can use the value from thename
property of any class:<div itemprop="about">Cinema</div> <div itemprop="about" itemscope itemtype="https://schema.org/Thing"> <span itemprop="name">Moscow</span> </div>
Dates of publication and revision
-
The dates of publication
datePublished
and revisiondateModified
are written in ISO 8601 format.<meta itemprop="datePublished" content="2018-12-11T08:56:49Z" />
or in the
datetime
attribute of thetime
tag<time itemprop="dateModified" datetime="2018-12-11T07:30:00Z"> 07:30, December 11, 2018 </time>
Category
-
A heading is a section of a website dedicated to a specific topic. To mark up a category, use the
BreadcrumbList
class. It describes a chain of linked web pages (“breadcrumbs”), which usually ends with the current content. Within theBreadcrumbList
, define multiple items of theListItem
type, which are marked up by theitemListElement
property and describe the current and broader headings.The nesting of categories is set using the
position
property of theListItem
class. For example, the “Culture” category may contain nested categories like “Cinema” and “Theater”. Ifposition = '1'
, materials are at the upper level (“Culture”); ifposition = '2'
, they are at the second level (“Cinema”).The heading of materials will be the value of the
name
property of theListItem
entity with the largestposition
value.Note
At the moment, the statistics shows two levels of category nesting.
<ol itemscope itemtype="http://schema.org/BreadcrumbList"> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life"> <span itemprop="name">Culture</span></a> <meta itemprop="position" content="1" /> </li> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life/weather"> <span itemprop="name">Cinema</span></a> <meta itemprop="position" content="2" /> </li> </ol>
Content URL
-
The content URL is specified using the
url
property.<a itemprop="url" href="https://www.example-news.com/life/weather/moscow"> example-news.com</a>
If the
url
property is not found, the system searches for a canonical link. This link is used to indicate the main content, if the current page duplicates a site page. Canonical links are marked with a specialrel="canonical"
attribute. For example, if the content is a duplicate of the pagehttp://www.example-news.com/page
, it contains<link rel="canonical" href="http://www.example-news.com/page"/>
. The value of thehref
attribute of the canonical link is used as the material's URL.The found value can be used when generating the content ID.
If the markup is correct and the tag is properly enabled, statistics on the content will soon start to be collected in Yandex Metrica.
When marking up a review, use the Review
item. Mark up the following content elements (mandatory elements are marked with an asterisk):
ID*
-
The ID is specified using the
identifier
property. It lets Yandex Metrica distinguish between different content. The ID isn’t shown in reports.<meta itemprop="identifier" content="12345">
You can also specify the ID using the
mainEntityOfPage
property. It's used if theidentifier
property isn't found. Yandex.Metrica searches it for theitemid
attribute value that will be used as the ID.<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="/restaurants/review/12345.html"/>
If none of the above properties are found, then a combination of the author name and headline, the top-level header from the
<h1>...<h6>
tags, or thehref
attribute value of the canonical reference is used as the ID.
If multiple IDs are marked up, the first value found will be used.
Title*
-
You can specify the headline using the
headline
oralternativeHeadline
property. The headline will appear in Yandex Metrica reports. If both properties are set, their values are written with a space. For example, the headlines can be marked up like this:<h1 itemprop="headline">New Asian restaurant in Moscow</h1> <h2 itemprop="alternativeHeadline"> Experimental cuisine by Japanese chef</h2>
In reports, the name of the content is a combination of the author name and the headline: “John Smith: New Asian restaurant opens in Moscow Experimental cuisine by chef from Japan”.
If none of the above properties is found, the value of the
name
oritemReviewed
property is used as the headline.
Text*
-
The text of a review should be placed in the tag with the
reviewBody
property.The number of characters in the text is determined. This is necessary to determine the volume of material. Only the contents of nested tags is considered text. The characters in the actual tags aren’t taken into account. We recommend that you mark up the text of materials so that it doesn’t include what is unnecessary: ad banners, comment blocks, etc., otherwise the volume of materials and statistics indicators may be calculated incorrectly.
<p itemprop="reviewBody"> A new Asian restaurant opened in Moscow on Wednesday, November 6. Check our review for event highlights and menu features. </p>
If the
reviewBody
property is not found, the values of thedescription
ortext
property will be used as text.If the above properties are not found, the entire content of the tag marked as
Review
, without tag characters, will be used as text.Note
You can get complete statistics for the content with text longer than 500 characters.
-
To specify the author, we use the
author
property. If there are multiple authors, specify them in different tags.<div itemprop="author">John Smith</div>
The value can also be taken from:
-
The
name
property of thePerson
class.<div itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">John Smith</span> </div>
-
The attribute of the
href
link.<link itemprop='author' href="/example/authors/john_smith.html"/>
With this data, you can view statistics for individual authors in Yandex Metrica.
-
Subject
-
You can mark up keywords or hashtags as topics. To do this, define the
about
property for each topic. You can use the value from thename
property of any class:<div itemprop="about">Restaurants</div> <div itemprop="about" itemscope itemtype="https://schema.org/Thing"> <span itemprop="name">Moscow</span> </div>
Dates of publication and revision
-
The dates of publication
datePublished
and revisiondateModified
are written in ISO 8601 format.<meta itemprop="datePublished" content="2018-12-11T08:56:49Z" />
or in the
datetime
attribute of thetime
tag<time itemprop="dateModified" datetime="2018-12-11T07:30:00Z"> 07:30, December 11, 2018 </time>
Category
-
A heading is a section of a website dedicated to a specific topic. To mark up a category, use the
BreadcrumbList
class. It describes a chain of linked web pages (“breadcrumbs”), which usually ends with the current content. Within theBreadcrumbList
, define multiple items of theListItem
type, which are marked up by theitemListElement
property and describe the current and broader headings.The nesting of categories is set using the
position
property of theListItem
class. For example, the “Reviews” category may contain nested categories like “Restaurants” and “Cafes”. Ifposition = '1'
, materials are at the upper level (“Reviews”); ifposition = '2'
, they are at the second level (“Restaurants”).The heading of materials will be the value of the
name
property of theListItem
entity with the largestposition
value.Note
At the moment, the statistics shows two levels of category nesting.
<ol itemscope itemtype="http://schema.org/BreadcrumbList"> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life"> <span itemprop="name">Reviews</span></a> <meta itemprop="position" content="1" /> </li> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life/weather"> <span itemprop="name">Restaurants</span></a> <meta itemprop="position" content="2" /> </li> </ol>
Content URL
-
The content URL is specified using the
url
property.<a itemprop="url" href="https://www.example-news.com/life/weather/moscow"> example-news.com</a>
If the
url
property is not found, the system searches for a canonical link. This link is used to indicate the main content, if the current page duplicates a site page. Canonical links are marked with a specialrel="canonical"
attribute. For example, if the content is a duplicate of the pagehttp://www.example-news.com/page
, it contains<link rel="canonical" href="http://www.example-news.com/page"/>
. The value of thehref
attribute of the canonical link is used as the material's URL.The found value can be used when generating the content ID.
If the markup is correct and the tag is properly enabled, statistics on the content will soon start to be collected in Yandex Metrica.
When marking up a recipe, use the Recipe
item. Mark up the following content elements (mandatory elements are marked with an asterisk):
ID*
-
The ID is specified using the
identifier
property. It lets Yandex Metrica distinguish between different content. The ID isn’t shown in reports.<meta itemprop="identifier" content="12345">
You can also specify the ID using the
mainEntityOfPage
property. It's used if theidentifier
property isn't found. Yandex.Metrica searches it for theitemid
attribute value that will be used as the ID.<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="/life/cuisine/12345.html"/>
If none of the above properties is found, the top-level header from the
<h1>...<h6>
tags or thehref
attribute value of the canonical reference is used as the ID.
If multiple IDs are marked up, the first value found will be used.
Title*
-
You can specify the headline using the
headline
oralternativeHeadline
property. The headline will appear in Yandex Metrica reports. If both properties are set, their values are written with a space. For example, if the headlines are marked up like this:<h1 itemprop="headline">Cheesy chicken</h1> <h2 itemprop="alternativeHeadline"> Classic recipe</h2>
in the report, the content is called “Chicken with cheese Classic recipe”.
If none of the above properties is found, the value of the
name
property is used as the headline.
Text*
-
The text of the recipe should be placed in the tag with the
recipeInstructions
property.The number of characters in the text is determined. This is necessary to determine the volume of material. Only the contents of nested tags is considered text. The characters in the actual tags aren’t taken into account. We recommend that you mark up the text of materials so that it doesn’t include what is unnecessary: ad banners, comment blocks, etc., otherwise the volume of materials and statistics indicators may be calculated incorrectly.
<p itemprop="recipeInstructions"> Cut the chicken into pieces and put in a roasting pan. Add salt, pepper, and seasoning to taste and top with pieces of cheese. Bake for 25 minutes at 200 °C. </p>
If the
recipeInstructions
property isn't found, the values of thedescription
ortext
property is used as text.If the above properties aren't found, the entire contents of the tag marked
Recipe
, without tag characters, is used as the text.Note
You can get complete statistics for the content with text longer than 500 characters.
-
To specify the author, we use the
author
property. If there are multiple authors, specify them in different tags.<div itemprop="author">John Smith</div>
The value can also be taken from:
-
The
name
property of thePerson
class.<div itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">John Smith</span> </div>
-
The attribute of the
href
link.<link itemprop='author' href="/example/authors/john_smith.html"/>
With this data, you can view statistics for individual authors in Yandex Metrica.
-
Subject
-
You can mark up keywords or hashtags as topics. To do this, define the
about
property for each topic. You can use the value from thename
property of any class:<div itemprop="about">Recipes</div> <div itemprop="about" itemscope itemtype="https://schema.org/Thing"> <span itemprop="name">Second courses</span> </div>
Dates of publication and revision
-
The dates of publication
datePublished
and revisiondateModified
are written in ISO 8601 format.<meta itemprop="datePublished" content="2018-12-11T08:56:49Z" />
or in the
datetime
attribute of thetime
tag<time itemprop="dateModified" datetime="2018-12-11T07:30:00Z"> 07:30, December 11, 2018 </time>
Category
-
A heading is a section of a website dedicated to a specific topic. To mark up a category, use the
BreadcrumbList
class. It describes a chain of linked web pages (“breadcrumbs”), which usually ends with the current content. Within theBreadcrumbList
, define multiple items of theListItem
type, which are marked up by theitemListElement
property and describe the current and broader headings.The nesting of categories is set using the
position
property of theListItem
class. For example, the “Recipes” category may contain nested categories like “Salads” and “Main course”. Ifposition = '1'
, content is at the upper level (“Recipes”), ifposition = '2'
— it's at the second level (“Entrees”).The heading of materials will be the value of the
name
property of theListItem
entity with the largestposition
value.Note
At the moment, the statistics shows two levels of category nesting.
<ol itemscope itemtype="http://schema.org/BreadcrumbList"> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life"> <span itemprop="name">Recipes</span></a> <meta itemprop="position" content="1" /> </li> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life/weather"> <span itemprop="name">Main course</span></a> <meta itemprop="position" content="2" /> </li> </ol>
Content URL
-
The content URL is specified using the
url
property.<a itemprop="url" href="https://www.example-news.com/life/weather/moscow"> example-news.com</a>
If the
url
property is not found, the system searches for a canonical link. This link is used to indicate the main content, if the current page duplicates a site page. Canonical links are marked with a specialrel="canonical"
attribute. For example, if the content is a duplicate of the pagehttp://www.example-news.com/page
, it contains<link rel="canonical" href="http://www.example-news.com/page"/>
. The value of thehref
attribute of the canonical link is used as the material's URL.The found value can be used when generating the content ID.
If the markup is correct and the tag is properly enabled, statistics on the content will soon start to be collected in Yandex Metrica.
When marking up questions and answers, use the Question
entity. Mark up the following content elements (mandatory elements are marked with an asterisk):
ID*
-
The ID is specified using the
identifier
property. It lets Yandex Metrica distinguish between different content. The ID isn’t shown in reports.<meta itemprop="identifier" content="12345">
You can also specify the ID using the
mainEntityOfPage
property. It's used if theidentifier
property isn't found. Yandex.Metrica searches it for theitemid
attribute value that will be used as the ID.<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="/qanda/animals/12345.html"/>
If none of the above properties are found, then a combination of the author name and headline, the top-level header from the
<h1>...<h6>
tags, or thehref
attribute value of the canonical reference is used as the ID.
If multiple IDs are marked up, the first value found will be used.
Title*
-
You can specify the headline using the
headline
oralternativeHeadline
property. The headline will appear in Yandex Metrica reports. If both properties are set, their values are written with a space. For example, the headlines can be marked up like this:<h1 itemprop="headline">Can hares swim?</h1> <h2 itemprop="alternativeHeadline"> Answered by Moscow zoologist</h2>
In reports, the name of the content is a combination of the author name and the headline: “John Smith: Can rabbits swim? A zoologist from Moscow responds”.
If none of the above properties is found, the value of the
name
property is used as the headline.
Text*
-
The text of an answer should be placed in the tag with the
acceptedAnswer
property.The number of characters in the text is determined. This is necessary to determine the volume of material. Only the contents of nested tags is considered text. The characters in the actual tags aren’t taken into account. We recommend that you mark up the text of materials so that it doesn’t include what is unnecessary: ad banners, comment blocks, etc., otherwise the volume of materials and statistics indicators may be calculated incorrectly.
<p itemprop="acceptedAnswer"> They're great swimmers! Once, while working on a small island of the Solovetsky archipelago in the White Sea, I witnessed how two white hares swam to my island on their own through a cold sea strait, more than three hundred meters wide. They spent some time on the shore and swam back to the mainland. </p>
If the
acceptedAnswer
property isn't found, the values of thedescription
ortext
property is used as the text.If the above properties are not found, the entire content of the tag marked as
Question
, without tag characters, is used as.Note
You can get complete statistics for the content with text longer than 500 characters.
-
To specify the author, we use the
author
property. If there are multiple authors, specify them in different tags.<div itemprop="author">John Smith</div>
The value can also be taken from:
-
The
name
property of thePerson
class.<div itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">John Smith</span> </div>
-
The attribute of the
href
link.<link itemprop='author' href="/example/authors/john_smith.html"/>
With this data, you can view statistics for individual authors in Yandex Metrica.
-
Subject
-
You can mark up keywords or hashtags as topics. To do this, define the
about
property for each topic. You can use the value from thename
property of any class:<div itemprop="about">Animals</div> <div itemprop="about" itemscope itemtype="https://schema.org/Thing"> <span itemprop="name">Zoology</span> </div>
Dates of publication and revision
-
The dates of publication
datePublished
and revisiondateModified
are written in ISO 8601 format.<meta itemprop="datePublished" content="2018-12-11T08:56:49Z" />
or in the
datetime
attribute of thetime
tag<time itemprop="dateModified" datetime="2018-12-11T07:30:00Z"> 07:30, December 11, 2018 </time>
Category
-
A heading is a section of a website dedicated to a specific topic. To mark up a category, use the
BreadcrumbList
class. It describes a chain of linked web pages (“breadcrumbs”), which usually ends with the current content. Within theBreadcrumbList
, define multiple items of theListItem
type, which are marked up by theitemListElement
property and describe the current and broader headings.The nesting of categories is set using the
position
property of theListItem
class. For example, the “Questions and answers” heading may contain such nested headings as “Animals” and “Birds”. Ifposition = '1'
, materials are at the upper level (“Questions and answers”), ifposition = '2'
— they are at the second level (“Animals”).The heading of materials will be the value of the
name
property of theListItem
entity with the largestposition
value.Note
At the moment, the statistics shows two levels of category nesting.
<ol itemscope itemtype="http://schema.org/BreadcrumbList"> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life"> <span itemprop="name">Questions and answers</span></a> <meta itemprop="position" content="1" /> </li> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="//example-news.ru/life/weather"> <span itemprop="name">Animals</span></a> <meta itemprop="position" content="2" /> </li> </ol>
Content URL
-
The content URL is specified using the
url
property.<a itemprop="url" href="https://www.example-news.com/life/weather/moscow"> example-news.com</a>
If the
url
property is not found, the system searches for a canonical link. This link is used to indicate the main content, if the current page duplicates a site page. Canonical links are marked with a specialrel="canonical"
attribute. For example, if the content is a duplicate of the pagehttp://www.example-news.com/page
, it contains<link rel="canonical" href="http://www.example-news.com/page"/>
. The value of thehref
attribute of the canonical link is used as the material's URL.The found value can be used when generating the content ID.
If the markup is correct and the tag is properly enabled, statistics on the content will soon start to be collected in Yandex Metrica.
How full scroll and full read metrics are calculated
Full scrolls are calculated based on the main entities. The calculation takes into account all the content of the tag in which they are described. For example, if the article text is in a tag with the Article
entity, then the calculation will be based on all the content up to the closing of this tag.
Full reads calculation takes into account the number of characters, so this metric can be calculated based on the articleBody
property.
Markup example
Below you can see an example of article markup.
<!DOCTYPE html>
<html>
<head></head>
<body>
<article>
<h1>Moscow breaks the 1922 temperature record</h1>
<div> Temperature in November exceeds 12 °C</div>
<span><a href="/example-news/authors/john_smith.html">John Smith</a></span>
<time datetime="2018-11-06T09:25:10+04:00">06.11.2018, 09:25</time>
<meta content="2018-11-06T09:25:10+04:00"/>
<div>
On Wednesday, November 6, Moscow broke the temperature
record registered in 1922. The air temperature was plus 12.1 degrees Celsius,
according to the Fobos center.
</div>
</article>
</body>
</html>
Example of page markup with multiple articles:
<!DOCTYPE html>
<html>
<head>
<link rel="canonical"
href="https://www.example-news.com/life/weather/2018/11/06/123.html" />
</head>
<body>
<div itemscope itemtype="http://schema.org/NewsArticle">
<meta itemprop="identifier" content="12345">
<meta itemprop="datePublished" content="2024-07-25T08:56:49Z" />
<h1 itemprop="headline">Moscow breaks the 1922 temperature record</h1>
<div itemprop="about">Weather</div>
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life/weather">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="2" />
</li>
</ol>
<p itemprop="articleBody"> On Wednesday, November 6, Moscow broke the temperature record
registered in 1922. The air temperature was plus 12.1 degrees
Celsius, according to the Fobos center.
</p>
<div itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">John Smith</span>
</div>
<a itemprop="url" href="https://test_one.ru"> First article</a>
</div>
<div itemscope itemtype="http://schema.org/NewsArticle">
<meta itemprop="identifier" content="54321">
<meta itemprop="datePublished" content="2024-07-25T08:56:49Z" />
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life/weather">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="2" />
</li>
</ol>
<div itemprop="about">Second article</div>
<h1 itemprop="headline">Moscow breaks the 1923 temperature record</h1>
<p itemprop="articleBody">On Wednesday, November 6, Moscow broke the temperature
record
registered in 1923. The air temperature was plus 13.1 degrees
Celsius,
according to the Fobos center.
</p>
<div itemprop="about" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name">John Smith
</div>
<a itemprop="url" href="https://test_two.ru"> Second article</a>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<link rel="canonical"
href="https://www.example-news.com/life/weather/2018/11/06/123.html" />
</head>
<body>
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
<a href="/"></a>
<li><a href="/politics/">Politics</a></li>
<li><a href="/business/">Business</a></li>
<li><a href="/social/">Social</a></li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/life/">
<span itemprop="name">Life</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/life/weather">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="2" />
</li>
<li><a href="/life/psychology/">Psychology</a></li>
<li><a href="/life/cooking/">Cooking</a></li>
</ol>
<article itemscope itemtype="http://schema.org/NewsArticle">
<meta itemprop="about" content="Heat"/>
<meta itemprop="about" content="Weather anomalies"/>
<h1 itemprop="headline">Moscow breaks the 1922 temperature record</h1>
<div itemprop="alternativeHeadline"> Temperature in November exceeds 12 °C</div>
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">John Smith</span>
</span>
<time itemprop="datePublished" datetime="2018-11-06T09:25:10+04:00">06.11.2018, 09:25</time>
<meta itemprop="dateModified" content="2018-11-06T09:26:10+04:00" />
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage"
itemid="/weather/november-heat.html"/>
<div itemprop="articleBody">
On Wednesday, November 6, Moscow broke the temperature
record registered in 1922. The air temperature was plus 12.1 degrees Celsius,
according to the Fobos center.
</div>
</article>
</body>
</html>
Example of page markup with multiple articles:
<!DOCTYPE html>
<html>
<head>
<link rel="canonical"
href="https://www.example-news.com/life/weather/2018/11/06/123.html" />
</head>
<body>
<div itemscope itemtype="http://schema.org/NewsArticle">
<meta itemprop="identifier" content="12345">
<meta itemprop="datePublished" content="2024-07-25T08:56:49Z" />
<h1 itemprop="headline">Moscow breaks the 1922 temperature record</h1>
<div itemprop="about">Weather</div>
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life/weather">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="2" />
</li>
</ol>
<p itemprop="articleBody"> On Wednesday, November 6, Moscow broke the temperature
record registered in 1922. The air temperature was plus 12.1 degrees Celsius,
according to the Fobos center
</p>
<div itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">John Smith</span>
</div>
<a itemprop="url" href="https://test_one.ru"> First article</a>
</div>
<div itemscope itemtype="http://schema.org/NewsArticle">
<meta itemprop="identifier" content="54321">
<meta itemprop="datePublished" content="2024-07-25T08:56:49Z" />
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life/weather">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="2" />
</li>
</ol>
<div itemprop="about">Second article</div>
<h1 itemprop="headline">Moscow breaks the 1923 temperature record</h1>
<p itemprop="articleBody">On Wednesday, November 6, Moscow broke the temperature
record registered in 1923. The air temperature was plus 13.1 degrees Celsius,
according to the Fobos center.
</p>
<div itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name">Van Vanov
</div>
<a itemprop="url" href="https://test_two.ru"> Second article</a>
</div>
</body>
</html>
Specifics of page content loading
If materials contain multiple images or complex scripts being run, “lazy loading” is often used, i.e., data is loaded asynchronously on the page. We recommend transmitting data with markup while content is being opened. This will make sure all values are received and processed correctly.
Learn more
Useful links |
Online training |
Property description
ID
The ID lets Yandex Metrica distinguish between different content. The ID isn’t shown in reports.
<meta itemprop="identifier" content="12345">
Property description
Title
You can specify the headline using the headline
or alternativeHeadline
property. The headline will appear in Yandex Metrica reports. If both properties are set, their values are written with a space. For example, if the headlines are marked up like this:
<h1 itemprop="headline">Moscow breaks the 1922 temperature record</h1>
<h2 itemprop="alternativeHeadline">Temperature in November exceeds 12 °C</h2>
In the report, the article is called “Moscow breaks the 1922 temperature record Temperature in November exceeds 12 °C”.
If none of the above properties is found, the value of the name
property is used as the headline.
Property description
Title
You can specify the headline using the headline
or alternativeHeadline
property. The headline will appear in Yandex Metrica reports. If both properties are set, their values are written with a space. For example, if the headlines are marked up like this:
<h1 itemprop="headline">Moscow breaks the 1922 temperature record</h1>
<h2 itemprop="alternativeHeadline">Temperature in November exceeds 12 °C</h2>
In the report, the article is called “Moscow breaks the 1922 temperature record Temperature in November exceeds 12 °C”.
If none of the above properties is found, the value of the name
property is used as the headline.
Property description
Date of publication
The dates of publication datePublished
and revision dateModified
are written in ISO 8601 format.
html <meta itemprop="datePublished" content="2018-12-11T08:56:49Z" />
or in the datetime
attribute of the time
tag
<time itemprop="dateModified" datetime="2018-12-11T07:30:00Z">07:30, December 11, 2018 </time>
Property description
Change date
The dates of publication datePublished
and revision dateModified
are written in ISO 8601 format.
html <meta itemprop="datePublished" content="2018-12-11T08:56:49Z" />
or in the datetime
attribute of the time
tag
<time itemprop="dateModified" datetime="2018-12-11T07:30:00Z">07:30, December 11, 2018 </time>
Property description
Category
A heading is a section of a website dedicated to a specific topic. To mark up a category, use the BreadcrumbList
class. It describes a chain of linked web pages (“breadcrumbs”), which usually ends with the current content. Within the BreadcrumbList
, define multiple items of the ListItem
type, which are marked up by the itemListElement
property and describe the current and broader headings.
The nesting of categories is set using the position
property of the ListItem
class. For example, the “Life” category may contain nested categories like “Weather” and “Incidents”. If position = '1'
, materials are at the upper level (“Life”), if position = '2'
— they are at the second level (“Weather”).
The heading of materials will be the value of the name
property of the ListItem
entity with the largest position
value.
Note
At the moment, the statistics shows two levels of category nesting.
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life">
<span itemprop="name">Life</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="//example-news.ru/life/weather">
<span itemprop="name">Weather</span></a>
<meta itemprop="position" content="2" />
</li>
</ol>
Property description
Author
To specify the author, we use the author
property. If there are multiple authors, specify them in different tags.
html <div itemprop="author">John Smith</div>
The value can also be taken from:
-
The
name
property of thePerson
class.<div itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">John Smith</span> </div>
-
The attribute of the
href
link.<link itemprop='author' href="/example/authors/ivan_ivanov.html"/>
With this data, you can view statistics for individual authors in Yandex Metrica.
Property description
Subject
You can mark up keywords or hashtags as topics. To do this, define the about
property for each topic. You can use the value from the name
property of any class:
<div itemprop="about">Heat</div>
<div itemprop="about" itemscope itemtype="https://schema.org/Thing">
<span itemprop="name">Moscow</span>
</div>
Property description
Canonical reference
The content URL is specified using the url
property.
<a itemprop="url" href="https://www.example-news.com/life/weather/moscow">example-news.com</a>
If the url
property is not found, the system searches for a canonical link. This link is used to indicate the main content, if the current page duplicates a site page. Canonical links are marked with a special rel="canonical"
attribute. For example, if the content is a duplicate of the page http://www.example-news.com/page
, it contains <link rel="canonical" href="http://www.example-news.com/page"/>
. The value of the href
attribute of the canonical link is used as the material's URL.
The found value can be used when generating the content ID.
Property description
ID
This property is used if the identifier
property isn't found. Yandex.Metrica searches it for the itemid
attribute value that will be used as the ID.
<meta itemscope itemprop="mainEntityOfPage"
itemType="https://schema.org/WebPage" itemid="/life/weather/12345.html"/>
Property description
Article text
The number of characters in the text is determined. This is necessary to determine the volume of material. Only the contents of nested tags is considered text. The characters in the actual tags aren’t taken into account. We recommend that you mark up the text of materials so that it doesn’t include what is unnecessary: ad banners, comment blocks, etc., otherwise the volume of materials and statistics indicators may be calculated incorrectly.
<p itemprop="articleBody">
On Wednesday, November 6, Moscow broke a temperature record registered in 1922. The air temperature was plus 12.1 degrees Celsius, according to the Fobos center.
</p>
If the articleBody
property isn't found, the values of the description
or text
property are used as the text.
If none of the properties are found, the contents of the tag marked Article
or NewsArticle
, without tag characters, are used as the text.
Note
You can get complete statistics for the content with text longer than 500 characters.