---
metadata:
  - name: generator
    content: Diplodoc Platform v5.55.2
alternate:
  - https://yandex.com/support/metrica/en/general/debugger.md
  - https://yandex.com/support/metrica/es/general/debugger.md
  - https://yandex.com/support/metrica/pt/general/debugger.md
  - https://yandex.com/support/metrica/ru/general/debugger.md
  - https://yandex.com/support/metrica/tr/general/debugger.md
  - https://yandex.com/support/metrica/zh/general/debugger.md
  - href: zh/general/debugger.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: Yandex Metrica 计数器调试器
description: 借助调试器，您可以检查 Yandex Metrica 计数器收集哪些数据以及是否正确收集目标、e-commerce 事件和内容统计数据：
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/zh/llms.txt


# Yandex Metrica 计数器调试器

使用调试器，您可以检查 [Yandex Metrica 计数器收集哪些数据](https://yandex.com/support/metrica/zh/general/check-counter.md)以及是否针对以下各方面正确收集数据：
- [目标](https://yandex.com/support/metrica/zh/general/check-goal.md)
- [E-commerce 事件](https://yandex.com/support/metrica/zh/ecommerce/check.md)
- [内容统计](https://yandex.com/support/metrica/zh/publishers/check-data.md)

要使用调试器，请附加 `_ym_debug=2` 参数到浏览器地址栏中的页面 URL 并刷新页面。

```httpget
http://example.com/?_ym_debug=2
```

![](../_assets/debug2-counters.png){.border-yes}

[调试面板中有哪些可用数据](https://yandex.com/support/metrica/zh/general/check-counter.md#data-debug)

## 使用调试器时记录活动 {#logs}

使用调试器时，您可以跟踪活动及其顺序。 Yandex Metrica 记录活动直至会话结束。 这表示您可以记录在不同网站页面上执行的活动。 完成后，您可以检查不同的调试器选项卡来分析收集的数据。

此选项位于 **Console**、**Events**、**E-commerce** 和 **Parameters** 选项卡上。

要保存活动日志，请在附加设置中选择 **Preserve log**。 默认情况下禁用此选项，这表示刷新页面时不会保存活动日志。

## 调试器为何不工作 {#debugger}

<!-- source: zh/_includes/general/creating-counter/debugger.md -->
#|
||
**原因**
|
**建议**
||
||
该计数器被 [Adblock Plus](https://adblockplus.org)插件、其他脚本或防火墙阻止。
|
您可以在浏览器控制台检查是否启用了 Adblock Plus 或其他脚本。
||
||
计数器未安装在网站上或安装不正确。 例如，CMS 修改了计数器代码。
|
重新安装计数器或联系您的 CMS 支持服务。
||
||
`mc.yandex.ru` 域在您操作系统上的 `hosts` 文件中被阻止。
|
检查您的操作系统设置。
||
|#
<!-- endsource: zh/_includes/general/creating-counter/debugger.md -->

<!-- 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/buttons/mail-button.md -->
<div class="cut-button">

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

<!-- source: zh/_includes/popup/id-popup/wrong-sup.md -->
请注意：我们的支持团队永远不会主动给您打电话。 请勿按照自称为 Yandex Metrica 支持团队来电者的指示操作。
<!-- endsource: zh/_includes/popup/id-popup/wrong-sup.md -->

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

{% endcut %}

</div>

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

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


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


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

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

<!-- 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/href-to-button.md -->

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

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

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