A link on a page is tracked if the
SAS page tag configuration results in the collection of data when
the link is clicked. Links are tracked based on the file type of the
target of the link. By default, links to all file types are instrumented
with the exception of the following: htm, html, asp, aspx, cfm, do,
and php. These link types are exceptions because these pages can be
tagged. Therefore, their content can be directly tracked.
Link instrumentation
is configured by using the st_cfg.cap[‘L’] array element.
The default setting of
st_cfg.cap['L']="";
tracks every link on a page. However, you can change the link configuration
in either st_siteCfg() or st_pageCfg()). For example, you can enter
st_cfg.cap['L']="0";
to prevent the tracking of any
links.
If you
enable link tracking with
st_cfg.cap['L']="";
, you can also track specific types of links by configuring the st_trk
element. See
Configuring Link Tracking in Tagged Pages for detailed information. For
details about configuring link tracking, see the documentation for
the cap array element in the
SAS Data Surveyor for Clickstream
Data 2.2 Page Tagging JavaScript Reference at
http://support.sas.com/clk22.
You can
also add code to enable and disable the stop-and-re-click behavior
that stops the user's initial click, collects data, and then re-clicks.
Use the
st_trk()
method to determine whether
an item is tracked and instrumented for data collection, as follows:
function st_trk(o)
{
switch(o.nodeName.toLowerCase())
{
case 'a': // Link elements
return true;
break;
default:
return true;
}
}
If you
do enable tracking with
st_trk()
, you can
use the
st_sar()
method to control how data
is collected. This method enables you to use your own programming
logic to control the stop-and-re-click behavior on and off, as follows:
function st_sar(o) {
switch(o.nodeName.toLowerCase())
{
case 'a': // Link elements
if ( o.href.indexOf('action=watch')>0 // MediaWiki watch/unwatch
button handling
|| o.href.indexOf('action=unwatch')>0)
return false;
else
return true;
break;
default:
return true;
}
For details
about configuring stop and re-click behavior, see the documentation
for st_trk() and st_sar() in the “SASSiteConfig.js”
section in the
SAS Data Surveyor for Clickstream Data 2.2
Page Tagging JavaScript Reference at
http://support.sas.com/clk22.