---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/support/metrica/en/behavior/link-map.md
  - https://yandex.com/support/metrica/es/behavior/link-map.md
  - https://yandex.com/support/metrica/pt/behavior/link-map.md
  - https://yandex.com/support/metrica/ru/behavior/link-map.md
  - https://yandex.com/support/metrica/tr/behavior/link-map.md
  - https://yandex.com/support/metrica/zh/behavior/link-map.md
  - href: zh/behavior/link-map.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: Link map
description: 用于分析您网站链接点击统计数据的工具。 根据链接的热门程度，其在热图上以不同的颜色突出显示。
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/zh/llms.txt


# Link map

_link map_ 是用于分析您网站的链接点击统计的工具。 根据链接的热门程度，其在热图上以不同的颜色突出显示。

当您点击链接时，将显示以下数据：

- 链接的点击次数。
- 该页面的点击次数占总点击次数的百分比。


## 限制 {#restrictions}

- <!-- source: zh/_includes/behavior/click-map/id-case/rule-map-1.md -->
  该热图仅显示在安装了 Yandex Metrica 计数器的网站页面上，并且仅当该网站使用 [UTF-8 编码](https://en.wikipedia.org/wiki/UTF-8)时显示。
  <!-- endsource: zh/_includes/behavior/click-map/id-case/rule-map-1.md -->
    
- 该报表不突出显示重定向链接（包括内部重定向）。 Yandex Metrica 允许您使用 trackLinks 参数显示到其他网站的重定向。
- <!-- source: zh/_includes/behavior/click-map/id-case/rule-map-2.md -->
  构建地图时，URL 中会排除 `www`、广告标签以及 `#`（含）之后链接部分等元素，但常规 URL 参数不会被排除。 这就是为什么页面 `http://example.com?id=1` 和 `http://example.com?id=2` 的点击热图会有所不同。
  <!-- endsource: zh/_includes/behavior/click-map/id-case/rule-map-2.md -->
    
- <!-- source: zh/_includes/behavior/click-map/id-case/rule-map-4.md -->
  不支持 Internet Explorer 8.0 及更早版本。
  <!-- endsource: zh/_includes/behavior/click-map/id-case/rule-map-4.md -->

- <!-- source: zh/_includes/behavior/click-map/id-case/rule-map-5.md -->
  报表生成采用[通用抽样算法](https://yandex.com/support/metrica/zh/reports/sampling.md)来调节数据量。 无论是否抽样，该报表最多将包含 100,000 个事件。
  <!-- endsource: zh/_includes/behavior/click-map/id-case/rule-map-5.md -->

- 要显示地图，网站必须正确处理 GET 参数。

## 连接 {#set}

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


{% note info %}

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

{% endnote %}



## 页面组统计 {#group}

<!-- source: zh/_includes/behavior/click-map/id-group/group1.md -->
要查看页面组统计，您可以在 URL 框中使用额外的字符。
<!-- endsource: zh/_includes/behavior/click-map/id-group/group1.md -->

![](../_assets/map-links-url.png){.border-yes}

<!-- source: zh/_includes/behavior/click-map/id-group/group2.md -->
## 用于显示统计的字符 {#group}

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

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


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


该热图将显示在热度最高的页面上，其 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 -->
