Using dcsMultiTrack

Any number of parameters can be passed to dcsMultiTrack provided they are passed to the function in pairs, and the parameters used are JavaScript strings enclosed in single or double quotes.

The first element of each pair is the name of the Webtrends query parameter you want to set, while the second element of each pair is the value you want the Webtrends query parameter to contain. To be recognized by Webtrends query parameters, the query parameter names must begin with WT., DCS., or DCSext.. The values that you specify replace the values that would normally be gathered by the Webtrends JavaScript tag. To avoid duplication of page views, you can report the dcsMultiTrack event with a different URL and page title than the initial page view for the HTML page. This requires using the DCS.dcsuri and WT.ti parameters with the dcsMultiTrack function. The following example illustrates this implementation:


In the above example, %20 was used to replace spaces in the page title. Because spaces can have a special meaning in many scripting languages, the best practice is to use URL encoding to represent any non-ASCII character, especially spaces, quotes, and parentheses.

Other parameters may be passed to dcsMultiTrack as well. Any Webtrends query parameter that you can set with a META tag can also be set with dcsMultiTrack. If the page contains META tags or parameters that specify Webtrends query parameters that data is sent to the SmartSource Data Collector along with values for the initial HTML page view.For a list of JavaScript event handlers and their corresponding attributes, refer to a JavaScript website.

In the following example, values from the initial HTML page view are sent to the Webtrends data collectors. If the page contains META tags or parameters that specify Webtrends query parameters, that data is also sent.

To invoke the dcsMultiTrack function to report a virtual page view to the Webtrends data collector, use the following syntax:

dcsMultiTrack('parameter1', 'value1', 'parameter2', 'value2');