|
SAS Data Surveyor for Clickstream Data 2.2 Page Tagging JavaScript Reference |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--GlobalFunctions
| Method Summary | |
<static> <private> Object
|
st_addListener(obj,evtName,func,capture)
Adds func as an event listener for the evtName specified to the object indicated. |
<static> <private> Object
|
st_clct(e)
st_clct Collects data from items on the page that have been instrumented for data collection. |
<static> <private> Object
|
st_debugPrint()
|
<static> <private> String
|
st_getVisitorID(sC,sV)
This function should not be overridden, as it returns the visitor ID by querying existing cookies for a prior visitor ID, or by creating a new one. |
<static> void
|
st_init()
This method loads configuration settings for tagging as well as the SAS, site, and page-defined data elements. |
<static> <private> void
|
st_instFrms(i)
private |
<static> <private> void
|
st_instLnks(i,d)
private |
<static> <private> void
|
st_onLoad(e)
This function is called each time a page is loaded, or when the user uses the browser's navigation buttons (back/forward) to return to the page. |
<static> <private> void
|
st_onUnload(e)
This function is called each time a page is unloaded, or when the user uses the browser's navigation buttons (back/forward) to leave a page. |
<static> void
|
st_pageCfg()
This function can be defined by the user within an individual page to change configuration values related to that specific page. |
<static> void
|
st_pageDats()
This function can be defined by the user to change the set of data elements that will be collected for that specific page. |
<static> <private> Object
|
st_redoAction()
Repeats the original user action stored in the request object. |
<static> boolean
|
st_sar(<String> o)
When tracking actions on an object in a page, this function determines if a stop-and-re-click should occur for the object in question. |
<static> <private> void
|
st_sd(<String> k,<String> v,<integer> m)
Sets an element's value, defining the element if it is not defined. |
<static> void
|
st_siteCfg()
This function can be defined by the user to change configuration values related to a specific site. |
<static> void
|
st_siteDats()
This function can be defined by the user to change the set of data elements that will be collected for a specific site. |
<static> boolean
|
st_trk(<object> o)
This function defines the condition(s) under which the object o will be tracked, and is called to determine if the specified object should be instrumented for data collection. |
| Method Detail |
<static> <private> Object st_addListener(obj,evtName,func,capture)
obj - The object to which the function should be added.
evtName - The short event name for which to listen. This should be specified in lower case. For example, "load" will listen for the load/onload event.
func - The name of the previously defined event handler function which will be called when the event is fired on obj.
capture - Optional parameter which defaults to true. If true, then the event handler will fire in the capturing phase (W3C compliant browsers only), otherwise, the event will fire in the bubbling phase.
<static> <private> Object st_clct(e)
<static> <private> Object st_debugPrint()
<static> <private> String st_getVisitorID(sC,sV)
<static> void st_init()
<static> <private> void st_instFrms(i)
<static> <private> void st_instLnks(i,d)
<static> <private> void st_onLoad(e)
<static> <private> void st_onUnload(e)
<static> void st_pageCfg()
It is called by st_init() after the default configuration is loaded, and after st_siteCfg() loads the site-specific configuration.
<static> void st_pageDats()
This function is called by st_init() after the default data collection elements are defined, and after site-wide data elements are defined.
<static> <private> Object st_redoAction()
<static> boolean st_sar(<String> o)
Standard behavior is to collect data on a click, stop the click event, and then re-click after data has been collected. In circumstances where this behavior would not result in the desired result, stop-and-re-click can be controlled by defining st_sar(), and returning true or false to enable or disable, respectively, stop-and-re-click for the object on which the action occured.
To define and enable this functionality:
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;
}
o - Object to check
<static> <private> void st_sd(<String> k,<String> v,<integer> m)
k - The key name to set
v - The key value to set
m - The bitmask controlling when this is collected
<static> void st_siteCfg()
This function is called by st_init() after the default configuration is loaded, and before st_pageCfg() loads the page-specific configuration.
<static> void st_siteDats()
This function is called by st_init() after the default data collection elements are defined, and before st_pageDats() defines page-specific data elements.
<static> boolean st_trk(<object> o)
The user can define this function to modify the conditions under which links will be tracked.
This function serves as a more flexible replacement for tracking by file extension (provided by the st_cfg.cap['L'] setting.)
If st_cfg.cap['L'] is blank and this function is not defined, all links will be tracked. This is the default behavior.
To define and enable this functionality:
NOTE: If you have previously added code to set the value of st_cfg.cap['L'] to something other than blank, either remove/modify this code, or set st_cfg.cap['L'] to blank after the prior code, as follows:
st_cfg.cap['L']='';
function st_trk(o)
{
switch(o.nodeName.toLowerCase())
{
case 'a': // Link elements
return true;
break;
default:
return true;
}
}
o - The DOM object for which a tracking decision needs to be made.
|
SAS Data Surveyor for Clickstream Data 2.2 Page Tagging JavaScript Reference |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||