Tracking Off-Site Links and Downloads

If you want to track a specific HTML link, whether to another site, a downloadable file, or any other linked target, you can implement the dcsMultiTrack function to collect this data whenever the link is clicked, using the JavaScript "onclick" event.

The following example illustrates how to track clicks on a link that leads to a different site by activating the dcsMultiTrack function:

<a href=""
onclick="dcsMultiTrack('DCS.dcssip', '',
'DCS.dcsuri', '/folder/page_of_interest.html',
'WT.ti', 'Page%20of%20Interest');">
Page of Interest</a>

In this example, the URL is included in the Pages report, as well as other reports. Even though the target page is not tagged with the Webtrends JavaScript code, the dcsMultiTrack function call simulates that page view by setting the domain, URL stem, and page title.

The same implementation can be used to track click frequency for link to download a file, such as a PDF file, Word document, sound file, or any other resource links included on the HTML page. The following example illustrates how the dcsMultiTrack function is used to report clicks to a PDF document:

<a href="/downloads/sales_brochure.pdf"
onclick="dcsMultiTrack('DCS.dcsuri', '/downloads/sales_brochure.pdf',
'WT.ti', 'Sales%20Brochure');">
Download a Sales Brochure</a>

Using this code would return reports showing a URL at the same domain as the HTML page, with the file path /downloads/sales_brochure.pdf. If you have configured Webtrends to count files with extension “PDF” as downloads, then this appears in the Downloaded Files report. Depending on your page view determination configuration, this may also appear in the Pages report.

use Webtrends On Premises with the default configuration, this appears in the Downloaded Files report, but not the Pages report. Webtrends Analytics 9 includes this information in both reports.

It is possible to use general event handlers to track all links or all downloads for a page or site. However, this level of implementation is beyond the scope of this document. Before implementing dcsMultiTrack to track a specific link or download, check with your Webtrends administrator to verify if such an event handler is implemented on your site.