I just had the opportunity to discuss the topic of managing Webtrends parameters with multitrack events and thought I'd bring the details to this forum for others that might be interested.
Please note that all the examples below are assuming you have a current Webtrends JS (sometimes called the "v9" tag) from http://tagbuilder.webtrends.com
Webtrends' JS tag has some convenient features for creating and sending specialized events such as specific click actions, ajax requests, etc.
Typically, when a developer wants to add a custom event, there is head scratching as to how to make sure the necessary parameters for data collection will be present on the events.
The dcsMultitrack function is the method exposed to devs to easily bundle up the Webtrends parameters and fire off a new event on or after a page load or user action.
dcsMultitrack will make sure that the needed Webtrends parameters are present on the hits and it allows you to add new custom params (no limit on custom params, you can send whatever you want). It also retains any existing parameters that you may have added from the content page that the multitrack event was called on.
Need "Base" Multitrack Event... no saved parameters
As easy as it is to send a custom event using Multitrack, there are a few scenarios that vary from the typical requirement: namely, what if you don't want all the Webtrends parameters loaded from initial Webtrends tag to be included?
Example: you have a click action where you want to capture a custom parameter for the click action but don't want it to be part of the content groups, product & campaign parameters that existed on the initial page load.
Firing the base multitrack event will include all the parameters from the initial data collection request when the tag fired and, therefore, you could see more counts of some events than you wanted.
Fortunately, there is an easy solution.
The WT JS also includes a function called dcsCleanup. Running this function leaves the capabilities of the Webtrends tag to be active but it cleans out all the Webtrends parameters attached to the event. Specifically: the "WT.___", the "DCS" and "DCSExt" parameters.
Simply add the dcsCleanup after your base dcsCollect event (it can be fired at any time).
var _tag=new WebTrends();
You can certainly add any parameters you _do_ want back in (content groups, page title WT.ti, etc.) and, in fact, you really should add some kinds of parameters. But the ones created from the page view event won't be on there.
After Cleanup don't forget to create a DCS.dcsuri value
After cleanup, there aren't any "page" parameters left around so you still need to create one before sending off your event. The URI value is normally the page url that the event occurred on.
Please note that multitrack events, without the page view parameters are considered to be stock click events. These will not add to your page view counts and won't show up as "pages" in your reports. This is naturally as designed but if you have a scenario that you want to use multitrack to create "page" type events make sure you put the appropriate parameters on these events. Example: an Ajax container where click actions are refreshing the data inside and you want each new piece of content to be viewed as a "page".
Optional: non-page view parameter WT.dl=1
Optional: if you don't want this to count as a page view event either, remember to pass a WT.dl=1 (any non-zero value is excluded from being counted as a page view).