---
title: "JavaScript Links"
slug: "javascript-links"
updated: 2020-05-06T16:23:48Z
published: 2020-05-06T16:23:48Z
canonical: "onpremises.webtrends.help/javascript-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.

# JavaScript Links

JavaScript links are hyperlinks whose URL contains the following protocol (scheme): `"javascript:"`.

If enabled, an event handler function is added for all links that have the JavaScript protocol.

**Using JavaScript links**

`&lt;a href="javascript:alert('Good Morning')"&gt;Alert Greeting&lt;/a&gt;`

Clicking the link generates the following parameters:

`DCS.dcsuri=javascript:alert('Good%20Morning') WT.ti=JavaScript:Alert Greeting WT.dl=22`

**JavaScript Example:**

```
window.webtrendsAsyncInit = function () {
        var dcs = new Webtrends.dcs();
        dcs.init( {
                dcsid: "dcs12345610000wocrvqy1nqm_123p", 
                javascript : true
        });
        dcs.track();
        }
```

JavaScript Reference:

| dcsMultiTrack Parameter | Value |
| --- | --- |
| **DCS.dcssip** | hostname |
| **DCS.dcsuri** | href |
| **WT.ti** | "JavaScript:" + title |
| **WT.dl** | 22 |
| **WT.nv** | Enclosing element id or classname (if present) |
