JavaScript Links
  • 06 May 2020
  • 1 Minute To Read
  • Contributors
  • Print
  • Share
  • Dark

JavaScript Links

  • Print
  • Share
  • Dark

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

<a href="javascript:alert('Good Morning')">Alert Greeting</a>

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

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)
Was This Article Helpful?