Transforms are functions that take as arguments a reference to the DCS object and the tracking object. They are used to modify the data collected or to change the behavior of the tracking code. In either case, they are called just before the beacon request is generated.
Transforms allow you to modify the Tag and/or Multitrack object just before the beacon request is created. Transforms come in two flavors: inline and global. The global transform applies to all Multitrack calls, where as the inline version only applies to the a single Multitrack call. You can have zero to many global transforms per page, where as inline transforms are zero or one per multitrack call.
Webtrends.addTransform(Function, Event, dcsObject)
JavaScript Example:
window.webtrendsAsyncInit = function ()
{
var dcs = new Webtrends.dcs();
dcs.init( {
dcsid: "dcs9x99xxxx9xxx9xx9xxxx9x_9x9x",
timezone: -7
});
Webtrends.addTransform(
function(dcsObject, multiTrackObject) {
multiTrackObject.argsa.push(
"DCSext.custom01", "foo",
"DCSext.custom02", "HW"
)
console.log("Transform1: std keys added!");
},
"all", dcs
);
dcs.track();
};