dcsimg

Can I remove the debug function in the webtrends.js tag?

Products

Webtrends Analytics 9.2x
Webtrends Analytics 8.x

Issue

Can I remove the debug function in the webtrends.js tag?

Resolution

Older versions of the Webtrends javascript tag have the dcsDebug(); function. This function may be noted by a client as a security risk. The following code may be removed from the tag, and is already deprecated in newer versions of the tag.

WebTrends.prototype.dcsDebug=function(){
var t=this;
var i=t.images[0].src;
var q=i.indexOf(“?”);
var r=i.substring(0,q).split(“/”);
var m=”Protocol
"+r[0]+"
“;
m+=”Domain
"+r[2]+"
“;
m+=”Path
/"+r[3]+"/"+r[4]+"
“;
m+=”Query Params"+i.substring(q+1).replace(/\&/g,"
")+"
“;
m+=”
Cookies
"+document.cookie.replace(/\;/g,"
")+"
“;
if (t.w&&!t.w.closed){
t.w.close();
}
t.w=window.open(“”,”dcsDebug”,”width=500,height=650,scrollbars=yes,resizable=yes”);
t.w.document.write(m);
t.w.focus();
}