---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.1
alternate:
  - https://www.yandex.com/support/metrica/en/reports/sampling.md
  - https://www.yandex.com/support/metrica/es/reports/sampling.md
  - https://www.yandex.com/support/metrica/pt/reports/sampling.md
  - https://www.yandex.com/support/metrica/ru/reports/sampling.md
  - https://www.yandex.com/support/metrica/tr/reports/sampling.md
  - https://www.yandex.com/support/metrica/zh/reports/sampling.md
  - href: zh/reports/sampling.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: 采样
description: 计算大数据量的指标可能需要大量的时间和资源。 因此，Yandex Metrica 可能仅将部分可用数据用于其报表，这称为采样。
---
> **Documentation Index:** Fetch the complete configuration index at https://www.yandex.com/support/metrica/zh/llms.txt


# 采样

Yandex Metrica 使用详细的会话和用户数据生成报表。 计算大数据量的指标可能需要大量的时间和资源。 因此，Yandex Metrica 可能仅将部分可用数据用于其报表，这称为采样。 这样，Yandex Metrica 便可以保持较高的报表生成速度。

## 什么是采样？ {#about}

[_采样_](https://baike.baidu.com/item/抽样技术/10283810)是一种用于数据处理的统计方法，其中有关所有数据的一般性评论均从其子集（称为样本）得出。

假设我们正在谈论对网站的直接点击。 我们可以统计其中有多少次出现在所有会话的 1/10 中，然后将结果乘以 10，即可得到直接访问的大致数量。 因此，您将获得快 10 倍的响应速度，但结果将是近似值。

## Yandex Metrica 采样机制 {#how-in-metrica}

采样算法均匀地选择网站受众的数据，确保采样报表与整个报表保持同样的相关性和属性分布。

{% note info %}

- 采样仅在 Yandex Metrica 中创建分析报表时使用。 原始数据不会被删除或更改。
- 采样不适用于 Yandex Metrica 中的“Yandex Direct”组报表。
- 受众细分是使用报表中的 100% 数据创建和保存的。
- Yandex Direct 报表中显示的是完整数据。
- 采样不会影响广告和推广的效果。

{% endnote %}

## 何时可以在 Yandex Metrica 中应用采样？ {#when-in-use}

在网页界面和 [API](https://yandex.com/dev/metrika/doc/api2/api_v1/intro.html) 中生成报表时，均可使用采样。

当原始请求样本超过 500,000 个会话（或相应报表中的 200 万次页面浏览）时，Yandex Metrica 可以应用采样。 采样率是动态确定的，以确保报表包含最大量的数据，这取决于所需的计算资源。

## 如何控制采样 {#how-to}

您可以使用 **Sample** 调整报表的采样级别。

![](../_assets/sampling-new-new.png){.border-yes}

如果增加样本大小，报表可能需要更长时间才能生成，也可能根本不会生成。 为了确保可以加载您的报表，如果原始数据包含超过 500,000 个会话，Yandex Metrica 可能会限制手动样本大小增加。

{% note info %}

该限制自 2023 年 9 月起生效。

{% endnote %}

## 如何获取全部数据的报表 {#full-data}

**缩短报表周期**

 
:   当您超出请求中的原始数据量限制时，将自动应用采样。 您可以通过缩短报表周期将请求调整为包含不超过 500,000 个会话。
    
    例如，如果您网站的月流量约为 100,000 个会话，则不同报表周期的采样率将如下所示：
    
    
    #|
    ||
    **报表周期**
    |
    **原始样本中的会话总数**
    |
    **用于生成报表的数据百分比**
    ||
    ||
    一个月
    |
    100,000
    |
    100%
    ||
    ||
    五个月
    |
    500,000
    |
    100%
    ||
    ||
    六个月
    |
    600,000
    |
    83.3%
    ||
    ||
    十二个月
    |
    1,200,000
    |
    41.7%
    ||
    |#


**成为 Yandex Advertising Network 合作伙伴**

 
:   若 [YAN 合作伙伴](https://partner.yandex.com/)的[可见](https://yandex.com/support2/partner/ru/technologies/ads-visibility-check)展示量持续达到每月至少 1000 万次，则其具备基于 100% 数据生成任何报表的能力。

<!-- 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/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/border-style.md -->

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