removeDownloadExtensions
The removeDownloadExtensions() removes a file extension from the existing list of file extensions that are tracked as downloads. Downloads are clicks on links to downloadable files.
Syntax
removeDownloadExtensions(extensions)
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
Parameters
extensions (string | array, required)
The list of file extensions not to be tracked as downloads. Can be passed as a string (Example: "zip|rar") or an array (Example: ["zip", "rar"]).
Examples
To remove the mhj|docx extensions from the existing list of file extensions:
_paq.push(["removeDownloadExtensions", "mhj|docx"]);
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
removeDownloadExtensions(extensions): void
Notes
- The list of file extensions is stored in a visitor's browser. You need to update it each time a page is loaded.
We check for extensions at the end of the URL path and in query parameter values. Here are a few examples of how we detect extensions:http://example.com/path/file.zip
http://example.com/path/file.zip#hello
http://example.com/path/file.zip?a=102
http://example.com/path/?a=file.zip
http://example.com/path/?a=file.zip&b=29
- Here's the default list of file extensions tracked as downloads: 7z, aac, apk, arc, arj, asf, asx, avi, azw3, bin, csv, deb, dmg, doc, docx, epub, exe, flv, gif, gz, gzip, hqx, ibooks, jar, jpg, jpeg, js, mobi, mp2, mp3, mp4, mpg, mpeg, mov, movie, msi, msp, odb, odf, odg, ods, odt, ogg, ogv, pdf, phps, png, ppt, pptx, qt, qtm, ra, ram, rar, rpm, sea, sit, tar, tbz, tbz2, bz, bz2, tgz, torrent, txt, wav, wma, wmv, wpd, xls, xlsx, xml, z, zip.
- Downloads are visible in the download report in Analytics > Reports > Downloads.
Related methods
Updated 6 days ago