/*
Name: TotalTracker
Description: capture code using js.
*/
var hwx = '';
var sid = '';
var affid = '';
var pid = '';
var lng = '';
var page_type = '';
var user_ip = '52.15.157.92';
var user_id = '1acfeb2da7942072e6653c69b3f6e87e';
var user_agent = navigator.userAgent;
var http_referer = document.referrer;
var host_name = getHost();
var full_host_name = getHost( true );
//--var request_domain = '411-spyware.com';
//--var request_uri = getUri();
var request_domain = host_name;
var request_uri = getUri( full_host_name );
//--var requestUrl = 'http://411-spyware.com/analytics/tracking/external_capture_track.php';
var requestUrl = location.protocol + '//411-spyware.com/analytics/tracking/external_capture_track.php';
var cookie_data = getCookie('AD');
if(cookie_data == ''){
setCookie('AD',user_id,365);
}else{
user_id = cookie_data;
}
var post_data = 'user_id='+escape(user_id)+
'&HTTP_USER_AGENT='+escape(user_agent)+
'&HTTP_REFERER='+escape(http_referer)+
'&HTTP_HOST='+escape(request_domain)+
'&REQUEST_URI='+escape(request_uri)+
'&REMOTE_ADDR='+escape(user_ip)+
'&hwx='+escape(hwx)+
'&sid='+escape(sid)+
'&affid='+escape(affid)+
'&pid='+escape(pid)+
'&page_type='+escape(page_type)+
'&lng='+escape(lng);
postData(requestUrl, post_data);
function getHost( full_host ){
var strhost = document.location.hostname;
if( full_host ){
return strhost;
}
else {
return strhost.replace('www.', '');
}
}
function getUri( full_host_name ){
var struri = document.location.href;
return struri.replace('http://'+full_host_name, '');
}
function setCookie(c_name,value,expiredays){
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}
function getCookie(c_name){
return "";
}
function postData(requestUrl, requestPost) {
//alert('requestUrl = '+requestUrl);
//alert('requestPost = '+requestPost);
var objHTTP, strResult;
if (window.XMLHttpRequest) {
objHTTP = new XMLHttpRequest();
}else if (window.ActiveXObject) {
var version = parseFloat(navigator.appVersion.split("MSIE")[1]);
if(version > 6){
objHTTP = new ActiveXObject("Microsoft.XMLHTTP");
}else{
objHTTP = new ActiveXObject('MSXML2.XMLHTTP.3.0');
}
}
objHTTP.open('POST',requestUrl,false);
objHTTP.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
objHTTP.send(requestPost);
//var strResult=objHTTP.responseText;
// alert('strResult = '+strResult);
}
function qs() {
var qsParm = new Array();
var query = window.location.search.substring(1);
//alert('query = '+ query);
var parms = query.split('&');
for (var i=0; i 0) {
var key = parms[i].substring(0,pos);
var val = parms[i].substring(pos+1);
qsParm[key] = val;
}
}
return qsParm;
}