---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://yandex.com.tr/support/metrica/en/webvisor/settings.md
  - https://yandex.com.tr/support/metrica/es/webvisor/settings.md
  - https://yandex.com.tr/support/metrica/pt/webvisor/settings.md
  - https://yandex.com.tr/support/metrica/ru/webvisor/settings.md
  - https://yandex.com.tr/support/metrica/tr/webvisor/settings.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/support/metrica/en/llms.txt

# Enabling and configuring Session Replay

## Connecting {#setup}

1. In Yandex Metrica, go to **Settings** → **Tag**.
2. Select the **Session Replay, scroll map, form analysis** option.
3. On the **Session Replay** tab, set the **Session Replay** option to **On**.
4. Save the changes.
5. Install the updated tag code on all the site’s pages.


{% note info %}

Session Replay may be disabled if you haven’t viewed any recordings in the past six months. To resume session recording, enable the option again.

{% endnote %}



## Configuring the recording of site content {#record}

You can manage the recording of site content through:

- [Input fields](#record-field) via the Yandex Metrica interface and using CSS classes.
- [Other site elements](#record-content) using CSS classes.

### Configuring the recording of input fields {#record-field}

Session Replay records user actions on a site, including filling in fields, such as the act of filling out a form. However, Yandex Metrica recognizes fields where users might enter confidential information such as their first and last name. The contents of such fields will not be recorded: in a Session Replay recording, asterisks will be shown instead of the data the user entered in such fields.

If you don't want Session Replay to record the content of any fields, disable the **Record all fields** option on the **Session Replay tab** in **Settings**. After this, the contents of all fields will be replaced with asterisks.

You can also control how fields are recorded using CSS classes (the [class](http://www.w3schools.com/tags/att_global_class.asp) attribute).


#|
||
**CSS class name**
|
**Description**
||
||
`ym-record-keys`
|
Allows you to record the contents of a field. Use this class for [textarea](https://www.w3schools.com/TAGS/tag_textarea.asp) and [input](https://www.w3schools.com/TAGS/tag_input.asp) elements.
||
||
`ym-disable-keys`
|
Allows you to prohibit the recording of a field’s contents. Use this class for [textarea](https://www.w3schools.com/TAGS/tag_textarea.asp) and [input](https://www.w3schools.com/TAGS/tag_input.asp) elements. The contents of this field will be replaced with asterisks.
||
|#

**How to allow the recording of individual fields**

 
:   <!-- source: en/_includes/definitons/webvisor-v2/settings/def-1.md -->
     
    1\. Disable the **Record all fields** option.

    2\. Assign the `ym-record-keys` CSS class to the fields that you want to record.

    Session Replay will record fields marked with the `ym-record-keys` CSS class, except for password fields. The contents of fields that aren't marked with the `ym-record-keys` CSS class will be replaced with asterisks.
    <!-- endsource: en/_includes/definitons/webvisor-v2/settings/def-1.md -->

**Prohibit recording individual fields**

 
:   <!-- source: en/_includes/definitons/webvisor-v2/settings/def-2.md -->
     
    1\. Enable the **Record all fields** option.
    2\. Assign the `ym-disable-keys` CSS class to the fields that you don’t want to record.
        
    The content in fields marked with the `ym-disable-keys` CSS class will be replaced with asterisks.
    <!-- endsource: en/_includes/definitons/webvisor-v2/settings/def-2.md -->

If Yandex Metrica has mistakenly identified a field as confidential, you can fix this by marking the field with the `ym-record-keys` CSS class.

In addition, you can configure the recording of the contents of the fields inside the hidden elements of the site.

### Configuring the recording of other site elements {#record-content}

By default, Session Replay records all the content of site pages, except for fields where users can enter confidential information, such as first and last names. You can control the recording of website content using CSS classes (the [class](http://www.w3schools.com/tags/att_global_class.asp) attribute). For example, you can prohibit the recording of the contents of a chat window. The rules defined for a class are triggered for the element itself and all child elements unless otherwise specified.


#|
||
**CSS class name**
|
**Description**
||
||
`ym-hide-content`
|
Allows you to prohibit the recording of an arbitrary site element. The image element will be grayed out, while the text will be replaced with a random set of characters that are blurred out.
||
||
`ym-show-content`
|
Allows you to record an arbitrary element of the site. This class can only be used for elements that are located within elements marked with the `ym-hide-content` CSS class.
||
|#

**How to prohibit the recording of a separate element**

 
:   <!-- source: en/_includes/definitons/webvisor-v2/settings/def-4.md -->
    Set the CSS class `ym-hide-content` for the element that you don't want to record the contents of.
        
    Session Replay will record all fields except the ones that are marked with the `ym-hide-content` CSS class. If an image block is marked with the CSS class, it will be replaced with a gray block. If it is text, then it will be replaced with a random set of characters that are blurred out.
        
    ![](../_assets/hide-content.png)
    <!-- endsource: en/_includes/definitons/webvisor-v2/settings/def-4.md -->

**How to allow the recording of a separate element placed inside an element that is hidden using the ym-hide-content CSS class**

 
:   <!-- source: en/_includes/definitons/webvisor-v2/settings/def-3.md -->
    For example, you can control the recording of a block containing reviews on your site, such as hiding the names of users and avatars, but recording the text of the review. As a result, the avatar will be replaced with a gray block, the user’s name will be replaced with a random set of characters that are blurred out, and the review text will be recorded as seen by its user during the session.
        
    If you want to allow the recording of an arbitrary element that is not an input field inside a hidden element, follow these steps:

    1\. Assign the `ym-hide-content` CSS class to the element that you want to hide.
    2\. Assign the `ym-show-content` CSS class to the element that you want to record.
    <!-- endsource: en/_includes/definitons/webvisor-v2/settings/def-3.md -->

**Recording an input field inside an element that is hidden using the ym-hide-content CSS class**

 
:   For example, the `ym-hide-content` CSS class is assigned to a block of reviews, and this block contains a form for submitting a review. In this case, Session Replay will not record the block of reviews, and the contents of the fields will be replaced with asterisks.
    
    In order for Session Replay to record the content of the field, assign the `ym-show-content` CSS class to it. If, during the recording of the session, Yandex Metrica identifies the field as confidential, then its contents will be replaced with asterisks.
    
    If you assign the `ym-record-keys` CSS class to fields located inside a hidden element, then the field content will be replaced with asterisks.

<!-- source: en/_includes/buttons/chat-button.md -->
[Chat with us](https://yandex.com.tr/chat/#/user/036e6a02-3620-9cdc-4c5e-a34667a7379e?utm_source=spravka){.button}

<!-- source: en/_includes/styles/href-to-button.md -->

<!-- endsource: en/_includes/styles/href-to-button.md -->
<!-- endsource: en/_includes/buttons/chat-button.md -->

<!-- source: en/_includes/popup/id-qanda/feedback-intro.md -->
<div class="cut-button">

{% cut "Write an email" %}

Select a question to find a solution.

{% list tabs radio %}

- Incorrect site content was recorded

  The page content in the recording may be different from the actual content. It’s likely that the CSS on the site frequently changes. In this case, add the content hash to the style file names. This will make the file name change every time you update its contents. For example, `style.390b32d4d49d5e7d.css` will become `style.0c573d460df87d4de5a4.css`. This lets Session Replay use the style that the site visitor sees when it records a session.

- Error during playback

  Do the following:

  - [Clear the](https://yandex.ru/support/browser/personal-data-protection/cache-memory.html?lang=ru#clearing-cache) browser cache.
  - Disable all plugins and browser extensions.
  - [Delete the browser cookies](https://yandex.ru/support/browser/personal-data-protection/cookies.html#del-cookie).
  - Check the firewall settings. It’s possible that the firewall is blocking the Yandex Metrica tag script. The tag could also be blocked by the [Adblock Plus](https://adblockplus.org) extension.

  {% cut "I followed the recommendations, but the error persists" %}


  <div style="padding: 15px;
       margin: 10px 0;
       background: #FFFFFF;
       border-radius: 10px;
       border: 1px solid var(--g-color-line-generic);">
    <iframe style="background: #FFFFFF;"
          height="700"
          width="100%"
          frameborder="0"
          src="https://forms.yandex.com.tr/surveys/1711/?&iframe=1&lang=tr">
    </iframe>
  </div>

  {% endcut %}

- Other questions

  
  If you have more questions about Session Replay, submit them in the form below. Provide an example of a session with incorrectly displayed data and specify the full version of your browser.

  <div style="padding: 15px;
       margin: 10px 0;
       background: #FFFFFF;
       border-radius: 10px;
       border: 1px solid var(--g-color-line-generic);">
    <iframe style="background: #FFFFFF;"
          height="700"
          width="100%"
          frameborder="0"
          src="https://forms.yandex.com.tr/surveys/1711/?&iframe=1&lang=tr">
    </iframe>
  </div>

{% endlist %}

{% endcut %}

</div>

<!-- source: en/_includes/styles/cut-button.md -->

<!-- endsource: en/_includes/styles/cut-button.md -->
<!-- endsource: en/_includes/popup/id-qanda/feedback-intro.md -->


<!-- source: en/_includes/footer-links.md -->
- - -

<div class="borderless-table">

#|
||
Useful links

- [Demo tag](https://metrica.yandex.com.tr/r/dashboard?)
- [Add a tag](https://metrica.yandex.com.tr/add/)
- [Free tag setup](https://yandex.com.tr/promo/freeservice/metrica?utm_source=help_metrica_tr&utm_medium=cpc&utm_campaign=1)
- [Yandex Metrica API](https://tech.yandex.com.tr/metrika/)
- [Suggest your idea](https://yandex.com.tr/support/metrica/troubleshooting/idea.html)
- [Discuss in Telegram](https://t.me/yandexmetrika)
|
Online training

- [Get a Yandex Metrica certificate](https://yandex.ru/adv/expert/exam/metrika/?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)


- [Take a training course](https://yandex.com/adv/edu/online/metrika?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)

||
|#

</div>

<!-- source: en/_includes/styles/table-style.md -->

<!-- endsource: en/_includes/styles/table-style.md -->
<!-- endsource: en/_includes/footer-links.md -->

<!-- source: en/_includes/styles/cut-button.md -->

<!-- endsource: en/_includes/styles/cut-button.md -->

<!-- source: en/_includes/styles/href-to-button.md -->

<!-- endsource: en/_includes/styles/href-to-button.md -->
