---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.1
alternate:
  - https://www.yandex.com/support/metrica/en/behavior/click-map.md
  - https://www.yandex.com/support/metrica/es/behavior/click-map.md
  - https://www.yandex.com/support/metrica/pt/behavior/click-map.md
  - https://www.yandex.com/support/metrica/ru/behavior/click-map.md
  - https://www.yandex.com/support/metrica/tr/behavior/click-map.md
  - https://www.yandex.com/support/metrica/zh/behavior/click-map.md
  - href: zh/behavior/click-map.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: Click map
description: 用于衡量并显示您网站点击统计数据的工具。 该热图显示所有页面元素（包括非链接元素）的点击。
---
> **Documentation Index:** Fetch the complete configuration index at https://www.yandex.com/support/metrica/zh/llms.txt


# Click map

_Click map_ 衡量并显示您网站上点击的统计数据。 该热图显示所有页面元素（包括非链接元素）的点击。 除了了解用户如何与单个页面互动之外，您还可以查看某个[页面组](#group)的汇总统计数据。 例如，您可以获得特定部分的统计数据。

## 热图使用方法 {#case}

Click map 可帮助您评估网站的整体可用性，识别最受欢迎的部分，并查看设计的哪些部分被用户误认为是链接。

元素采用颜色编码来指示它们的使用频率。 该热图显示页面（或页面组）上的总点击次数以及当前可见区域中的点击百分比。

您可以使用多种热图显示模式：

- “Heat map” — 暖色对应频繁点击，冷色对应罕见点击。
    
- “Monochrome map” — 颜色越浓，点击频率越高。
- “Clicks on links and buttons” — 该热图仅显示链接和按钮的点击情况。 它不显示其他元素的点击情况。
- “Transparency map” — 点击热图显示为“雾屏”：最常点击的元素在“雾”中最明显。
    
- “Element map” — 该热图显示页面上的所有元素。

{% note info %}

- 该热图仅显示在安装了 Yandex Metrica 计数器的网站页面上，并且仅当该网站使用 [UTF-8 编码](https://en.wikipedia.org/wiki/UTF-8)时显示。
- 您可以查看一年或更短时间段的统计数据。
- 构建地图时，URL 中会排除 `www`、广告标签以及 `#`（含）之后链接部分等元素，但常规 URL 参数不会被排除。 这就是为什么页面 `http://example.com?id=1` 和 `http://example.com?id=2` 的点击热图会有所不同。
- 不支持 Internet Explorer 8.0 及更早版本。
- 报表生成采用[通用抽样算法](https://www.yandex.com/support/metrica/zh/reports/sampling.md)来调节数据量。 无论是否抽样，该报表最多将包含 100,000 个事件。

{% endnote %}



## 连接 {#set}

1. 在 Yandex Metrica 中，转到 **Settings** → **Tag**。
1. 选择 **Session Replay, scroll map, form analysis** 选项。
1. 保存更改。
1. 在所有网站页面上安装经更新的计数器代码。


{% note info %}

如果过去六个月未浏览过热图，该热图可能会被禁用。 要恢复会话录制，请再次启用该选项。

{% endnote %}



## 页面组统计 {#group}

要查看页面组统计，您可以在 URL 框中使用额外的字符。
![](../_assets/map-url.png){.border-yes}

## 用于显示统计的字符 {#group}

#|
||
**字符**
|
**描述**
|
**示例**
||
||
\*
|
匹配任意数量的任意字符
|
显示 URL 以 https://example.com/goods/ 开头的所有页面的数据，包括指定页面：`https://example.com/goods/*`。

如果您输入的地址没有额外字符，Yandex Metrica 将提供带有 * 字符的下拉建议
||
||
~
|
条件是正则表达式
|
显示 URL 与正则表达式匹配的页面的数据。 例如，`~http://example.com/.*`
||
|#

让我们看一个示例： 您需要获取 https://example.com/goods/ 目录中页面的统计。 为了使该数据显示在热图上，请在地址框中输入 https://example.com/goods/*（输入后，下拉建议中会显示相同的地址）。 数据将自动加载。

该热图将显示在热度最高的页面上，其 URL 与您指定的 URL 相匹配。 数字指标（页面浏览次数、点击次数和可见点击百分比会针对所有符合条件的页面进行合并）。


## 在 iframe 中显示数据 {#iframe}

如果您的网站受到保护，不会在 iframe 中显示（在服务器设置中使用 `X-Frame-Options` 标头），您将无法查看收集到的数据。 要查看网站的会话数据，请在服务器设置中使用正则表达式，以便为以下域添加例外：

- 您的网站
- metrika.yandex.ru
- metrika.yandex.by
- metrica.yandex.com
- metrica.yandex.com.tr
- webvisor.com 及其子域

```no-highlight
^https?:\/\/([^\/]+\.)?(yourdomain\.com|webvisor\.com|metri[ck]a\.yandex\.(com|ru|by|com\.tr))\/
```

如果您使用 nginx，请将以下例外添加到您的配置中：

```no-highlight
location / {
        set $frame_options '';
        if ($http_referer !~ '^https?:\/\/([^\/]+\.)?(yourdomain\.com|webvisor\.com|metri[ck]a\.yandex\.(com|ru|by|com\.tr))\/'){
            set $frame_options 'SAMEORIGIN';
        }
        add_header X-Frame-Options $frame_options;
        ...
    }
```

其中 `yourdomain\.com` 是网站的域名。 使用您网站的域区域（可能与 .com 不同）。


## 页面大小限制 {#display-map}

为了在热图上显示数据，网站页面必须满足一定的大小限制。 以下值用于在各种浏览器中显示热图：


#|
||
**浏览器**
|
**最大页面高度/宽度（以像素为单位）**
|
**最大像素数**
||
||
Mozilla Firefox
|
32,767
|
472,907,776 (22,528 x 20,992)
||
||
Chrome
|
32,767
|
268,435,456 (16,384 x 16,384)
||
||
Internet Explorer
|
8,192
|
67,108,864 (8,192 x 8,192)
||
|#


## 问题与解答 {#qanda}


{% cut "Click map、link map 或 scroll map 页面无休止加载" %} {#redirect}


在 Safari 12 及更高版本中，由于浏览器设置中的选项，click map、link map 或 scroll map 页面可能永远无法完成加载。

1. 转到 **Privacy** 选项卡并禁用 **Prevent cross-site tracking** 选项。
1. 重新启动浏览器并再次打开热图。


{% endcut %}

{% cut "发出请求后，热图中将出现 “No data” 通知" %} {#no-data}


如果在标签设置中的 **Filters** 选项卡上禁用了 **Change from https to http** 活动，可能会出现此情况。 在这种情况下，所有使用 HTTP 协议的 URL 均在该热图上，并且网站本身具有 HTTPS 协议。

要显示数据，请禁用活动。
![](../_assets/https-to-http.png){.border-yes}

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

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