Setting up data collection

Yandex Metrica lets you use HTML markup to control some types of collected data. The JavaScript code of a Yandex Metrica tag reacts to the presence of classes of HTML elements (the class attribute). The rules defined for a class are triggered for the element itself and all child elements unless otherwise specified.

Class

Action

ym-disable-clickmap

Disables click tracking.

Information about clicks on these elements is not collected and not displayed in the click map.

Single element

<a href="/forum/" class="ym-disable-clickmap">Forum</a> 

Container element

<ul class="ym-disable-clickmap">
 <li><a href="/events/">Events</a></li>
 <li><a href="/specials/">Best deals</a></li>
 <li><a href="/contacts/">Contacts</a></li>
</ul> 

Entire page

<body class="ym-disable-clickmap">
 ...
</body> 

ym-disable-tracklink

Indicates that the link is not outbound.

Clicks on these links are not shown in the Outbound clicks report.

<a href="/top-secret/" class="ym-disable-tracklink">Secret</a> 

ym-disable-submit

Disables tracking form data submission events.

Information about submitted form data won't be shown in the Session Replay and Form analysis tools.

ym-disable-keys

Disables recording the data entered in fields. Use this class for textarea and input elements.

Information about filled in fields will not be shown in the Session Replay and form analysis tools.

ym-hide-content

Disables recording of user interface elements. Available only with Session Replay.

ym-show-content

Enables the recording of arbitrary site elements. Available only with Session Replay.

ym-record-keys

Enables recording the contents of fields. Available only with Session Replay. Use this class for textarea and input elements.

ym-external-link

Indicates that the link is outbound.

<a href="/forum/" class="ym-external-link">Forum</a>

Chat with us

Write an email

Please note: Our support team will never initiate a call to you. Do not follow any instructions of people who call you and introduce themselves as the Yandex Metrica support team.