addFileExtension

Tip. Working with the JavaScript API requires knowledge of HTML and JavaScript. If you don't have these skills, 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
  • AC3
  • ACS
  • AI
  • AVI
  • APE
  • APK
  • ASF
  • BMP
  • BZ2
  • CAB
  • CDR
  • CRC32
  • CSS
  • CSV
  • CUE
  • DIVX
  • DMG
  • DJV
  • DJVU
  • DOC
  • DOCX
  • DOCM
  • DOCB
  • EMF
  • EPS
  • EXE
  • FLA
  • FLAC
  • FLV
  • GIF
  • GZ
  • TGZ
  • ISO
  • JPG
  • JPE
  • JPEG
  • JS
  • M3U
  • 3U8
  • M4A
  • M4V
  • MD5
  • MKV
  • MP3
  • MP4
  • MPG
  • MPEG
  • MOV
  • MSI
  • ODS
  • OGG
  • OGM
  • OGV
  • PDF
  • PHPS
  • PNG
  • PPT
  • PPTX
  • PPTM
  • PPTB
  • PSD
  • RAR
  • RSS
  • RTF
  • SEA
  • SIT
  • SFV
  • SHA1
  • SVG
  • SWF
  • TAR
  • TIF
  • TIFF
  • TORRENT
  • TS
  • TXT
  • VOB
  • WAV
  • WAVE
  • WEBM
  • WMA
  • WMV
  • wmf
  • XLS
  • XLSX
  • XLSM
  • XLSB
  • XPI
  • ZIP
  • GZIP

Example

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