---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
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
title: Link map
description: A tool for analyzing statistics for clicks on links on your site. Links are highlighted in different colors on the map depending on their popularity.
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/en/llms.txt


# Link map

The _link map_ is a tool for analyzing link click stats for your site. Links are highlighted in different colors on the map depending on their popularity.

When you click a link, the following data is displayed:

- The number of clicks on the link.
- The percentage of clicks out of the total for that page.


## Restrictions {#restrictions}

- <!-- source: en/_includes/behavior/click-map/id-case/rule-map-1.md -->
  The map is only displayed on those pages of the site where the Yandex Metrica tag is installed, and also if the site uses [UTF-8 encoding](https://en.wikipedia.org/wiki/UTF-8).
  <!-- endsource: en/_includes/behavior/click-map/id-case/rule-map-1.md -->
    
- The report doesn’t highlight redirect links (including internal redirects). Yandex Metrica lets you display redirects to other sites using the [trackLinks](https://yandex.com/support/metrica/en/code/counter-initialize.md#param-trackLinks) parameter.
- <!-- source: en/_includes/behavior/click-map/id-case/rule-map-2.md -->
  When building the map, elements such as `www`, advertising tags, and the part of the link after `#` (inclusive) are excluded from the URL, but regular URL parameters are not excluded. This is why the click maps for the pages `http://example.com?id=1` and `http://example.com?id=2` will be different.
  <!-- endsource: en/_includes/behavior/click-map/id-case/rule-map-2.md -->
    
- <!-- source: en/_includes/behavior/click-map/id-case/rule-map-4.md -->
  Internet Explorer versions 8.0 and earlier are not supported.
  <!-- endsource: en/_includes/behavior/click-map/id-case/rule-map-4.md -->

- <!-- source: en/_includes/behavior/click-map/id-case/rule-map-5.md -->
  Report generation uses the [general sampling algorithm](https://yandex.com/support/metrica/en/reports/sampling.md) to regulate the data volume. The report will contain a maximum of 100,000 events, regardless of sampling.
  <!-- endsource: en/_includes/behavior/click-map/id-case/rule-map-5.md -->

- To display the map, the site must correctly process GET parameters.

## Connecting {#set}

1. In Yandex Metrica, go to **Settings** → **Tag**.
1. Select the **Session Replay, scroll map, form analysis** option.
1. Save the changes.
1. Install the updated tag code on all the site’s pages.


{% note info %}

The map may be disabled if it hasn’t been viewed in the past six months. To resume session recording, enable the option again.

{% endnote %}



## Statistics on a group of pages {#group}

<!-- source: en/_includes/behavior/click-map/id-group/group1.md -->
To view statistics for a group of pages, you can use extra characters in the URL box.
<!-- endsource: en/_includes/behavior/click-map/id-group/group1.md -->

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

<!-- source: en/_includes/behavior/click-map/id-group/group2.md -->
## Characters used for displaying statistics {#group}

#|
||
**Character**
|
**Description**
|
**Example**
||
||
\*
|
Matches any number of any characters
|
Display data for all pages with URLs that start with https://example.com/goods/, including the specified page: `https://example.com/goods/*`.

If you enter the address without extra characters, Metrica will offer a drop-down suggestion with the * character
||
||
~
|
The condition is a regular expression
|
Show data for pages with a URL matching a [regular expression](https://yandex.com/support/metrica/en/general/regexp.md). For example: `~http://example.com/.*`
||
|#
<!-- endsource: en/_includes/behavior/click-map/id-group/group2.md -->


<!-- source: en/_includes/behavior/click-map/id-group/group3.md -->
Let’s look at an example. You need to get statistics on pages in the directory https://example.com/goods/. In order for this data to be shown on the map, enter https://example.com/goods/* in the address box (after you enter it, the same address is shown in the drop-down suggestion). Data is loaded automatically.
<!-- endsource: en/_includes/behavior/click-map/id-group/group3.md -->


The map will be displayed on the most popular page with a URL that matches what you specified. Numeric indicators (the number of click-throughs from the link, the percent of referrals) will be combined for all the pages that match the condition.


## Showing data in an iframe {#iframe}

If your site is protected from being shown in an iframe (the `X-Frame-Options` header is used in the server settings), you won't be able to view the collected data. To view the site’s session data, use a regular expression in the server settings to add exceptions for the following domains:

- your website
- metrika.yandex.ru
- metrika.yandex.by
- metrica.yandex.com
- metrica.yandex.com.tr
- webvisor.com and its subdomains

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

If you use nginx, add the following exceptions to your configuration:

```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;
        ...
    }
```

where `yourdomain\.com` is the site's domain name. Use your site’s domain zone (it may differ from .com).


## Page size restriction {#display-map}

In order to display data on the map, the website pages must meet certain size restrictions. The values below are for displaying the map in various browsers:


#|
||
**Browser**
|
**Maximum page height/width (in pixels)**
|
**Maximum number of pixels**
||
||
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)
||
|#


## Questions and answers {#qanda}

{% cut "Click map, link map or scroll map page loads endlessly" %} {#redirect}


In Safari 12 and higher, the click map, link map, or scroll map page may never finish loading due to an option in the browser settings.

1. Go to the **Privacy** tab and disable the **Prevent cross-site tracking** option.
1. Restart the browser and open the maps again.


{% endcut %}

{% cut "When a request is made, a “No data” notification appears in the map" %} {#no-data}


This can happen if in the tag settings on the tab **Filters** the action **Change from https to http** is enabled. In this case, all URLs with HTTP protocols are on the map, and the site itself has the HTTPS protocol.

To start displaying the data, disable the operation.
![](../_assets/https-to-http.png){.border-yes}

{% endcut %}

<!-- source: en/_includes/buttons/chat-button.md -->
[Chat with us](https://yandex.com/chat/#/user/036e6a02-3620-9cdc-4c5e-a34667a7379e?utm_source=spravka){.button}

<!-- source: en/_includes/styles/href-to-button.md -->

<!-- endsource: en/_includes/styles/href-to-button.md -->
<!-- endsource: en/_includes/buttons/chat-button.md -->

<!-- source: en/_includes/buttons/mail-button.md -->
<div class="cut-button">

{% cut "Write an email" %}

<!-- source: en/_includes/popup/id-popup/wrong-sup.md -->
Please note: Our support team will never initiate a call to you. Do not follow any instructions of people who call you and introduce themselves as the Yandex Metrica support team.
<!-- endsource: en/_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: en/_includes/styles/cut-button.md -->

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


<!-- source: en/_includes/footer-links.md -->
- - -

<div class="borderless-table">

#|
||
Useful links

- [Demo tag](https://metrica.yandex.com/r/dashboard?)
- [Add a tag](https://metrica.yandex.com/add/)
- [Free tag setup](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/)
- [Suggest your idea](https://yandex.com/support/metrica/troubleshooting/idea.html)
- [Discuss in Telegram](https://t.me/yandexmetrika)
|
Online training

- [Get a Yandex Metrica certificate](https://yandex.ru/adv/expert/exam/metrika/?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)


- [Take a training course](https://yandex.com/adv/edu/online/metrika?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)

||
|#

</div>

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

<!-- endsource: en/_includes/styles/table-style.md -->
<!-- endsource: en/_includes/footer-links.md -->

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

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

<!-- source: en/_includes/styles/href-to-button.md -->

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

<!-- source: en/_includes/styles/border-style.md -->

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