---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.1
alternate:
  - https://yandex.com/support/metrica/en/webvisor/requirements.md
  - https://yandex.com/support/metrica/es/webvisor/requirements.md
  - https://yandex.com/support/metrica/pt/webvisor/requirements.md
  - https://yandex.com/support/metrica/ru/webvisor/requirements.md
  - https://yandex.com/support/metrica/tr/webvisor/requirements.md
  - https://yandex.com/support/metrica/zh/webvisor/requirements.md
  - href: zh/webvisor/requirements.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: 用户行为回放的要求和限制
description: Session Replay 的要求和限制。
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/zh/llms.txt


# 用户行为回放的要求和限制


{% note info %}

当您查看录制时，其内容可能与网站当前的内容有所不同。 这是因为 Session Replay 在会话发生时捕获网站的 HTML 内容，而不是在您查看录制时捕获。

{% endnote %}

**Content-Type 选项**

 
:   用户行为回放工具支持样式、图像和字体文件，以及具有特定 `Content-Type` 类型的其他元素：

   <div class="table-without-border">

   #|
   || `text/css`

   `image/`

   `jpg`

   `font/ttf`

   `font/otf`

   `font/opentype`

   `font/truetype`

   | `font/woff`

   `font/woff2`

   `application/font-otf`

   `application/font-ttf`

   `application/font-sfnt`

   `application/x-font-ttf`

   `application/font-woff`

   | `application/font-woff2`

   `application/vnd.ms-fontobject`

   `application/font-truetype`

   `application/font-opentype`

   `application/octet-stream`

   `text/html`

   `text/plain` ||
   |#

   </div>

   具有不同 `Content-Type` 类型的元素在会话记录中可能会显示不正确。

**机器人会话**

 
:   用户行为回放工具还可以录制 Yandex Metrica 或 Yandex Direct 识别为机器人流量的会话。

**录制视频和音频内容**

 
:   Session Replay 不录制 HTML `audio` 和 `video` 元素的内容以及用户如何与这些元素交互，前提是在这些元素中修改了 `Audio` 和 `Video` 对象。

**在隐私浏览模式下录制浏览器选项卡**

 
:   由于浏览器限制，Session Replay 可能会错误录制有关隐私模式下标签页的信息（例如，Yandex Browser 中的[隐身模式](https://yandex.com/support/browser/personal-data-protection/incognito-mode.html)，或其他浏览器中的类似模式）。

   某些浏览器可能会在隐私模式下完全阻止计数器，这意味着会话不会被录制，也不会显示在您的统计数据中。

**录制来自另一个域的 iframe 内容**

 
:   为了使用户行为回放工具录制地址与网站地址不同的 iframe 内容，请以特定方式配置计数器。

**录制和回放存在布局错误的页面** {#5}

 
:   用户行为回放工具会按照浏览器显示的样式准确录制页面。 这意味着任何 HTML 布局缺陷（例如未闭合的计数器或错误的元素嵌套）都会按照浏览器的处理方式，原封不动地呈现在记录中。

   用户行为回放工具通常会适配此类错误。 但如果页面布局不符合 [W3C 标准](https://www.w3.org/standards/)，或包含大量缺陷，会话录制可能不会呈现网站所有者预期的效果。

**录制具有灵活布局的页面** {#3}

 
:   即使用户屏幕的分辨率与回放屏幕不同，具有灵活布局的页面上的会话也将正确回放。 在回放过程中，由于录制页面和回放页面上元素的相对位置不同，您可能会看到光标小跳。

**将 Session Replay 2.0 用于频繁更新的 CSS 文件** {#css}

 
:   如果您的网站经常更新 CSS，请将内容散列添加到样式文件名中。 这将使文件名在每次更新其内容时发生更改。 例如，`style.390b32d4d49d5e7d.css` 将变为 `style.0c573d460df87d4de5a4.css`。 这使 Session Replay 能够使用网站访问者在其录制会话时看到的样式。

**如果网站有多个计数器，请使用 Session Replay** {#2}

 
:   在这种情况下，仅在已安装的其中一个计数器上启用 Session Replay。 如果为所有计数器启用 Session Replay，则所有计数器的数据均未正确录制。

**每天录制数量的限制** {#4}

 
:   在一天内，Session Replay 会录制足够数量的会话，以形成一个具有代表性的样本。 全天录制的会话数量由特殊算法确定，可能会有所不同。

**录制存储期限的限制**

 
:   数据存储 15 天，包括当天。

**处理样式**

 
:   如果网站使用[运行时样式](*рантайм-стили)（包括来自 Data Styled Components 系列的运行时样式），Session Replay 不会录制会话或不正确地录制这些会话。 我们建议使用经典样式。

**支持 Shadow DOM**

 
:   Session Replay 不支持 Shadow DOM 技术。

**浏览器支持**

 
:   Session Replay 支持大多数现代桌面浏览器（包括 Yandex Browser、Google Chrome、Firefox、Safari、Opera 和 Microsoft Edge）的会话录制。 测试版和某些移动浏览器对录制的支持有限。 Internet Explorer（任何版本）中对会话录制和回放的支持也很有限。
    
    不同的浏览器可能以不同的方式处理同一页面。 这意味着要准确回放会话，您使用的浏览器应与最初录制会话的浏览器相同。

**画布支持** {#iframe-canvas}

 
:   如果使用[画布](https://www.w3.org/TR/html5/semantics-scripting.html#the-canvas-element)元素显示网站内容，Session Replay 不会录制网站内容。

**推荐网站编码** {#1}

 
:   如果网站使用 [UTF-8 编码](https://en.wikipedia.org/wiki/UTF-8)，Session Replay 会正确录制用户操作。

<!-- source: zh/_includes/buttons/chat-button.md -->
[与我们聊天](https://yandex.com/chat/#/user/036e6a02-3620-9cdc-4c5e-a34667a7379e?utm_source=spravka){.button}

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

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

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

{% cut "发送电子邮件" %}

选择一个问题以查找解决方案。

{% list tabs radio %}

- 录制了错误的网站内容

  录制中的页面内容可能与实际内容有所不同。 网站上的 CSS 可能经常更改。 在这种情况下，请将内容散列添加到样式文件名中。 这将使文件名在每次更新其内容时发生更改。 例如，`style.390b32d4d49d5e7d.css` 将变为 `style.0c573d460df87d4de5a4.css`。 这使 Session Replay 能够使用网站访问者在其录制会话时看到的样式。

- 回放期间出错

  请执行下列操作：

  -[清除](https://yandex.ru/support/browser/personal-data-protection/cache-memory.html?lang=ru#clearing-cache)浏览器缓存。
  - 禁用所有插件和浏览器扩展程序。
  - [删除浏览器 cookie](https://yandex.ru/support/browser/personal-data-protection/cookies.html#del-cookie)。
  - 检查防火墙设置。 防火墙可能阻止了 Yandex Metrica 计数器脚本。 该计数器也可能被 [Adblock Plus](https://adblockplus.org) 扩展程序阻止。

  {% cut "我遵循了建议，但错误仍然存在" %}


  <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/surveys/1711/?&iframe=1&lang=en">
    </iframe>
  </div>

  {% endcut %}

- 其他问题

  
  如果您有更多 Session Replay 相关问题，请在下面的表单中进行提交。 提供数据显示不正确的会话示例，并指定浏览器的完整版本。

  <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/surveys/1711/?&iframe=1&lang=en">
    </iframe>
  </div>

{% endlist %}

{% endcut %}

</div>

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

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


[联系我们](https://yandex-ad.cn/contact){.button}


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

<div class="borderless-table">

#|
||
实用链接

- [演示计数器](https://metrica.yandex.com/r/dashboard?)
- [添加计数器](https://metrica.yandex.com/add/)
- [免费计数器设置](https://yandex.com/promo/freeservice/metrica?utm_source=help_metrica_en&utm_medium=cpc&utm_campaign=1)
- [Yandex Metrica API](https://tech.yandex.com/metrika/)
- [提出您的想法](https://yandex.com/support/metrica/troubleshooting/idea.html)
|
线上培训



- [参加培训课程](https://yandex.com/adv/edu/online/metrika?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)

||
|#

</div>

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

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

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

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

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

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

<!-- source: zh/_includes/styles/table-without-border.md -->

<!-- endsource: zh/_includes/styles/table-without-border.md -->

[*рантайм-стили]: 页面加载时生成的样式。