---
metadata:
  - name: generator
    content: Diplodoc Platform v5.55.2
alternate:
  - https://yandex.com/support/metrica/en/objects/tracklinks.md
  - https://yandex.com/support/metrica/es/objects/tracklinks.md
  - https://yandex.com/support/metrica/pt/objects/tracklinks.md
  - https://yandex.com/support/metrica/ru/objects/tracklinks.md
  - https://yandex.com/support/metrica/tr/objects/tracklinks.md
  - https://yandex.com/support/metrica/zh/objects/tracklinks.md
  - href: en/objects/tracklinks.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/en/llms.txt

# trackLinks


{% note alert %}

Outdated method. Supported for backward compatibility, but may be deprecated at any time. We strongly discourage its use.

To manage tracking outbound clicks, use the [trackLinks](https://yandex.com/support/metrica/en/code/counter-initialize.md#param-trackLinks) parameter when initializing a tag.

{% endnote %}


Setting tracking of outbound links and download links.

The collected data is used when generating [click maps](https://yandex.com/support/metrica/en/behavior/link-map.md) and the [Outbound clicks](https://yandex.com/support/metrica/en/content/external-links.md) and [File downloads](https://yandex.com/support/metrica/en/content/file-downloads.md) reports.

```javascript
ym(XXXXXXXX, 'trackLinks', enabled);
```


#|
||
**Parameter**
|
**Type**
|
**Default value**
|
**Description**
||
||
`enabled`[*](*Параметр)
|
`true`
|
Boolean
|
Enables/disables tracking outbound links and file download links.

Example
```javascript ym(XXXXXXXX, 'trackLinks', false); ```
||
|#

<sup >*</sup> Required parameter.

To disable tracking information about particular outbound clicks, use the [ym-disable-tracklink](https://yandex.com/support/metrica/en/code/html-markup.md#class-ym-disable-tracklink) HTML class.

To mark an internal link as an outbound link, use the [ym-external-link](https://yandex.com/support/metrica/en/code/html-markup.md#class-ym-external-link) class.

<!-- 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/reports/support-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/1705/?&iframe=1&lang=en">
  </iframe>
</div>

{% endcut %}

</div>



<!-- 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 -->
<!-- endsource: en/_includes/reports/support-button.md -->

[*Параметр]: <sup >*</sup> Required parameter.