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

# addFileExtension

<!-- source: en/_includes/code/counter-initialize/id-counter-initialize/rest-js.md -->
{% note warning %}

Working with the JavaScript API requires knowledge of HTML and JavaScript. If you don’t know these languages, contact your website developer or webmaster.

{% endnote %}
<!-- endsource: en/_includes/code/counter-initialize/id-counter-initialize/rest-js.md -->


Tracks downloads of files with the specified extensions.

```javascript
ym(XXXXXXXX, 'addFileExtension', extensions);
```


#|
||
**Parameter**
|
**Default value**
|
**Type**
|
**Description**
||
||
`extensions`[*](*Параметр)
|
:
|
String \| String[]
|
The file name extension set as a string, or a list of extensions specified as an array of strings
||
|#

^*^ Required parameter.

By default, the following extensions are supported:


#|
||
- 3GP
- 7Z
- AAC
- AVI
- APK
- CSV
- DJVU
- DOCX
- EXE
|
- FLAC
- FLV
- GZ
- KEY
- MIDI
- MKA
- MKV
- MP3
- MP4
|
- MPEG
- MOV
- MSI
- OGG
- PDF
- PKG
- PPS
- PPT
- PPTX
|
- RAR
- RTF
- TXT
- WAV
- WMA
- WMV
- wmf
- XLSX
- ZIP
|||#

> # Example
> 
> ```javascript
> ym(XXXXXXXX, 'init', {});
> ym(XXXXXXXX, 'addFileExtension', 'lzh'); // Add one extension
> ym(XXXXXXXX, 'addFileExtension', ['lha', 'iff', 'ico']); // Add multiple extensions
> ```

<!-- source: en/_includes/buttons/chat-button.md -->
[Chat with us](https://yandex.com.tr/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/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.tr/surveys/1706/?&iframe=1&lang=tr">
  </iframe>
</div>

{% endcut %}

</div>

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

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

{% include [footer-links](../_includes/footer-links.md) %}

[*Параметр]: <sup >*</sup> Required parameter.
{% included (../_includes/footer-links.md) %}

- - -

<div class="borderless-table">

#|
||
Useful links

- [Demo tag](https://metrica.yandex.com.tr/r/dashboard?)
- [Add a tag](https://metrica.yandex.com.tr/add/)
- [Free tag setup](https://yandex.com.tr/promo/freeservice/metrica?utm_source=help_metrica_tr&utm_medium=cpc&utm_campaign=1)
- [Yandex Metrica API](https://tech.yandex.com.tr/metrika/)
- [Suggest your idea](https://yandex.com.tr/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 -->


{% endincluded %}
{% included (../_includes/footer-links.md:styles/table-style.md) %}


{% endincluded %}