Open Graph

Open Graph is a vocabulary used for the semantic markup of web data. It lets you control the preview that is generated when publishing links on social networks and transmit information to other internet services. For more details, see the official website.

Note. Open Graph markup data is publicly available, and any service can extract and use it.

Markup

Data about an object in Open Graph is described by sets of property-value pairs in meta tags. The property must be specified in property and its value in content. For example, you can specify that the type of object being described is an article:

<meta property="og:type" content="article">

The standard requires that Open Graph data be located in the head tag. However, to collect content statistics, we recommend placing meta tags on the node where the content is embedded, especially when there are multiple content items on the page. This is necessary for accurately calculating full scroll and full read metrics.

How to mark up content

Mark up the following content elements (required elements are marked with an asterisk):

Headline*
The headline is shown in Yandex.Metrica reports. It is specified in the og:title property.
<meta property="og:title" content="The temperature in Moscow broke the record set in 1922">
Text*

The text is the content of the node that contains the described material. If the markup is in the head tag, the text will be the entire contents of the body tag. Tag symbols are not taken into account. The text defines the number of characters. This is necessary for determining the volume of material and calculate scroll depth and read depth metrics.

Note. You can get complete statistics for content with text longer than 500 characters. Content with shorter text is only taken into account in recirculation.
Author

The author is specified using the article:author property. If there are multiple authors, list them in different meta tags.

<meta property="article:author" content="John Smith">
<meta property="article:author" content="Mark Jacobs">

With this data, you can view statistics for individual authors.

Topic

You can mark up keywords and hashtags as topics. Specify the topics in the article:tag property. If there are multiple topics, list them in different meta tags.

<meta property="article:tag" content="Heat">
<meta property="article:tag" content="Moscow">
Dates of publication and revision

Publication dates and changes are specified in the article:published_time and article:modified_time properties. Dates are written in ISO 8601 format.

<meta property="article:modified_time" content="2018-12-11T08:56:49Z">
<meta property="article:published_time" content="2018-11-06T09:26:10+04:00">
Category

A category is a section of a website dedicated to a specific topic. To specify a material category, use the property article:section.

<meta property="article:section" content="Weather">
Content URL

The content URL must be contained in the property og:url.

<meta property="og:url" content="https://www.example-news.com/life/weather/moscow"/>

Otherwise, the value will be taken from the canonical link:

<link rel="canonical" href="https://www.example-news.com/life/weather/moscow">

If the markup is correct and the tag is properly enabled, statistics on the content will soon start to be collected in Yandex.Metrica.

Markup example

<html prefix="og:http://ogp.me/ns# article:http://ogp.me/ns/article#">
  <head>
    <title>The temperature in Moscow broke the record set in 1922</title>
    ...
  </head>  
 <body>
   <div>
    <meta property="og:type" content="article"/>
    <meta property="og:title" content="The temperature in Moscow broke the record set in 1922"/>
    <meta property="og:url" content="https://www.example-news.com/life/weather/moscow#cao"/>
    <meta property="article:section" content="Weather">
    <meta property="article:modified_time" content="2018-12-11T08:56:49Z">
    <meta property="article:published_time" content="2018-11-06T09:26:10+04:00">   
    <meta property="article:author" content="John Smith">
    <meta property="article:author" content="Mark Jacobs">
    <meta property="article:tag" content="Heat">
    <meta property="article:tag" content="Moscow">
    On Wednesday, November 6, the temperature 
in Moscow broke the record set in 1922. According to the Fobos center,
        the air temperature was 12.1°C.
   </div>
   ...
 </body>
</html>