Anchor Links
  • 06 May 2020
  • 1 Minute to read
  • Contributors
  • Dark
  • PDF

Anchor Links

  • Dark
  • PDF


Anchor links are hyperlinks whose URL contains: An anchor (URL followed by hash mark "#" followed by fragment identifier) or a hostname from the onsitedoms array.

If enabled, an event handler function is added for all links that are Anchors. The onsitedoms array is a comma-separated list of file domain names or a regular expression, which is used to determine if a link is "on domain".


Suppose the onsite domain field contains:

Page contains the following named link:

<a name=TopOfPage>Top of Page</a>

Page contains the following hyperlink:

<a href="#TopOfPage">Go to top</a>

Clicking the link generates the following parameters:

Defining the onsitedoms parameter

The onsitedoms config parameter allows you to define what domains will be considered "on domain". For example, if you want to track off-site links from the product site, and you enable off-site link tracking, you can ensure that links to your branding site continue to be tracked as on-site links by setting the onsitedoms config parameter to,

JavaScript Example:

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

JavaScript Reference:

dcsMultiTrack Parameter Value
WT.ti 21
WT.dl download: true
WT.nv Enclosing element id or classname (if present)
DCS.dcssip hostname
DCS.dcsuri pathname or "/"

Was this article helpful?

What's Next