addFileExtension

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

Tracks downloads of files with the specified extensions.

ym(XXXXXX, '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

ym(XXXXXX, 'init', {});
ym(XXXXXX, 'addFileExtension' 'lzh'); // Add one extension
ym(XXXXXX, 'addFileExtension' ['lha', 'iff', 'ico']); // Add multiple extensions