---
title: "Download Links"
slug: "download-links"
updated: 2020-05-06T16:22:48Z
published: 2020-05-06T16:22:49Z
canonical: "onpremises.webtrends.help/download-links"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://onpremises.webtrends.help/llms.txt
> Use this file to discover all available pages before exploring further.

# Download Links

## Download Links

Download links are hyperlinks whose URL is: A download file (URL filename extension matches one of the types in the file types field)

If enabled, an event handler function is added for all links that are downloads, where a download is defined by the extension type in the `downloadtypes` array. The `downloadtypes` array is a comma-separated list of file extensions and has a default value of: `xls,doc,pdf,txt,csv,zip,docx,xlsx,rar,gzip`.

**Defining `downloadtypes`**

The `downloadtypes` config parameter allows you to define what file extensions will be considered a download. For example, if you want to track the downloading of `bin` and `que` files, you can do this by adding the downloadtypes config parameter with a value of `bin`,`que`.

**Using downloadtypes** Suppose the `downloadtypes` config parameter contains:

"`xls`,`doc`"

Page contains the following hyperlink:

`&lt;a href="smartsource.xls?lang=en"&gt;SmartSource Spreadsheet&lt;/a&gt;`

Clicking the link generates the following parameters:

`DCS.dcssip=tagbuilder.webtrends.com` `DCS.dcsuri=/Help/EventTracking/smartsource.xls` `DCS.dcsqry=?lang=en` `WT.ti=Download:SmartSource Spreadsheet` `WT.dl=20`

**JavaScript Example:**

```
window.webtrendsAsyncInit = function () {
        var dcs = new Webtrends.dcs();
        dcs.init( {
                dcsid: "dcs12345610000wocrvqy1nqm_123p",
                download : true,
                downloadtypes : "xls,doc,pdf,txt,csv,zip,docx,xlsx,rar,gzip", 
        });
        dcs.track();
        }
```

JavaScript Reference:

| dcsMultiTrack Parameter | Value |
| --- | --- |
| **DCS.dcssip** | hostname |
| **DCS.dcsuri** | pathname or "/" |
| **DCS.dcsqry** | search (if present) |
| **WT.ti** | "Download:" + title |
| **WT.dl** | 20 |
| **WT.nv** | Enclosing element id or classname (if present) |
