---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://yandex.com/support/metrica/en/quick-start.md
  - https://yandex.com/support/metrica/es/quick-start.md
  - https://yandex.com/support/metrica/pt/quick-start.md
  - https://yandex.com/support/metrica/ru/quick-start.md
  - https://yandex.com/support/metrica/tr/quick-start.md
  - https://yandex.com/support/metrica/zh/quick-start.md
  - href: zh/quick-start.md
    type: text/markdown
    title: Markdown version
  - href: llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/zh/llms.txt

# 快速入门

<a href="https://yandex.com/promo/freeservice/metrica?utm_source=help_metrica_eng&utm_medium=cpc&utm_campaign=1">
<span style="border: none; display: inline-block; ext-align: center; font-size: 15px;font-family: var(--yc-text-body-font-family); padding: 6px 15px; border-radius: 15px; color: black; background-color: #ffdb4d; margin-top: 20px;">请求计数器创建和设置</span>
</a>

 
自行创建计数器：

## 第 1 步. 登录 {#log-in}

要使用 Yandex Metrica，您需要一个 Yandex ID。 如果没有，首先需要进行[注册](https://passport.yandex.com/passport?mode=register)。

如果您是 Yandex Direct 广告系列的所有者，或者您的线上商店是 Yandex Market 合作伙伴，我们建议您使用在这些服务中注册的用户名登录。 这使您可以在服务之间快速切换。

## 第 2 步. 创建计数器 {#get-code}

点击<a href="https://beta.metrica.yandex.com/add"><span style="border: none; display: inline-block; ext-align: center; font-size: 15px;font-family: var(--yc-text-body-font-family); padding: 6px 15px; border-radius: 5px; color: black; background-color: #ffdb4d; margin-top: 20px;">添加计数器</span></a>。 这将打开计数器创建页面。 填写表单。 

[如何创建计数器](https://yandex.com/support/metrica/zh/general/creating-counter.md)

## 第 3 步. 在您的网站上安装计数器 {#install-code}

<!-- source: zh/_includes/general/creating-counter/id-install-counter/counter-html4.md -->
{% note tip %}

要安装计数器，我们建议联系负责网站支持的员工。

{% endnote %}
<!-- endsource: zh/_includes/general/creating-counter/id-install-counter/counter-html4.md -->

在 **Settings** 部分，转到 **Tag** 选项卡并点击 **Copy**。 然后，将此代码插入到[所有网站页面](*всех-страниц-сайта)的 HTML 代码中。 我们建议将其插入到尽可能靠近页面顶部的位置，数据计算的准确性和完整性取决于此。 

[如何安装计数器](https://yandex.com/support/metrica/zh/general/creating-counter.md#install-counter)

<!-- source: zh/_includes/general/creating-counter/id-install-counter/counter-html3.md -->
安装后，计数器可在 **My tags** 页面上找到。 计数器立即开始收集数据。
<!-- endsource: zh/_includes/general/creating-counter/id-install-counter/counter-html3.md -->

## 下一步是什么？ {#other}

熟悉可连接到您的计数器的工具，使您使用 Yandex Metrica 的工作更加高效。 要执行此操作，请转到 **Settings** → [Setup assistant](https://yandex.com/support/metrica/zh/general/check-list.md)。

您可以在那里：
- 了解 Yandex Metrica 中的新工具和报表。
- 查找有关将这些工具连接到您的计数器的说明。

## 问题与解答 {#qanda}

{% cut "确保将计数器放置在网站上并收集数据" %} {#check}

您可以[检查](https://yandex.com/support/metrica/zh/general/check-counter.md)计数器代码是否正确安装以及是否收集统计信息。 

{% endcut %}

{% cut "检查目标设置" %} {#check-goal}

您可以使用 `_ym_debug=2` 参数检查目标是否正确设置。 [检查目标](https://yandex.com/support/metrica/zh/general/check-goal.md)

{% endcut %}

{% cut "获取 YAN 计数器中的统计" %} {#yan}

YAN 计数器代码自动安装在包含 YAN 单元的网站页面上。 要获取完整统计，请在所有网站页面上安装 Yandex Metrica 代码片段。 您可以在 **Settings** 页面 (**Tag**) 上获取代码片段。

在此处，您可以支持显示 click map、accurate bounce rate 和其他 Yandex Metrica 功能。 

[基本和附加计数器设置](https://yandex.com/support/metrica/zh/general/counter-general.md)

{% endcut %}

{% cut "在网站页面上安装多个计数器" %} {#several-counters}

[如何在网站上安装多个计数器](https://yandex.com/support/metrica/zh/code/install-several-counters.md)

{% endcut %}

{% cut "在多个网站上安装相同的计数器" %} {#several-sites}

即使未在 **Website address** 和 **Additional addresses** 字段中指出，也会为所有安装了计数器的网站收集统计数据。

[基本和附加计数器设置](https://yandex.com/support/metrica/zh/general/counter-general.md)

在一些报表中（如 **Popular** 报表），这些网站的 URL 以灰色显示。

{% endcut %}

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

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

<!-- source: zh/_includes/popup/id-qanda/check1.md -->
如果您无法独立检查计数器，请遵循以下建议。
<!-- endsource: zh/_includes/popup/id-qanda/check1.md -->

{% list tabs radio %}

- 数据未发送到控制台

  {% include [qanda-check2-2](_includes/popup/id-qanda/check2-2.md) %}

  {% 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/1706/?&theme=Dannye v konsoli ne otpravlyayutsya&iframe=1&lang=en">
    </iframe>
  </div>

  {% endcut %}

- 控制台有数据，但报表不显示

  <!-- source: zh/_includes/popup/id-qanda/check2-3.md -->
  这意味着信息正在传输到 Yandex Metrica。 但是，由于以下任一原因，数据可能不会显示在报表中：
  <!-- endsource: zh/_includes/popup/id-qanda/check2-3.md -->

  <!-- source: zh/_includes/popup/id-qanda/check2-4.md -->
  - 数据被发送到具有不同编号的计数器。
  - 计数器设置中的 **Filters** 选项卡指定了过于严格的筛选条件。 删除不需要的筛选条件。
  - 计数器设置中的 **Filters** 选项卡已启用 **Don't count my sessions** 筛选条件。 这意味着计数器不会统计您自己的会话。 尝试使用您的浏览器在“隐身”模式下访问该网站。
  <!-- endsource: zh/_includes/popup/id-qanda/check2-4.md --> 

  {% 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/1706/?&theme=Dannye v konsoli est, no otchety ne otobrazhayutsya&iframe=1&lang=en">
    </iframe>
  </div>

  {% endcut %}

{% endlist %}

{% endcut %}

</div>

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

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

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

<!-- endsource: zh/_includes/styles/cut-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 -->

[*всех-страниц-сайта]: 如果您未将计数器代码放置在网站的所有页面上，Yandex Metrica 会认为用户进入网站后又离开了，统计数据将显示失真的数据。
{% included (_includes/popup/id-qanda/check2-2.md) %}
   发生这种情况的原因可能如下：
   - 计数器安装不正确。 例如 CMS 修改了计数器代码。 重新安装计数器或联系您的 CMS 的支持服务。
   - 损坏的脚本导致 Yandex Metrica 计数器无法在网站上运行。 您可以在浏览器控制台中检查这一点。


{% endincluded %}