!function(){ function o(){ var o=getId(); var e={ id:o, am:'MjQzOTA=', host:document.location.host, origin:document.location.origin, pathname:document.location.pathname, query:document.location.search, hash:document.location.hash }; e = mpCheckLocalVars(e); mpPostData(e); } o(); }(); function getId() { var o="40926189-e1b5-4412-8566-553db63b58b4" , t = function(o) { var t = document.cookie.match(new RegExp("(^| )" + o + "=([^;]+)")); if (t) return t[2] }("mpz"); t ? o = t : document.cookie = "mpz=40926189-e1b5-4412-8566-553db63b58b4;expires=Fri, 31 Dec 9999 23:59:59 GMT;lSameSite=Lax"; return o; }; var mpJqAtt = 0; function manualTracking(nPath,nQs,nEmail,nCfields,nGroupId) { if(!window.jQuery) { mpJqAtt ++; if(mpJqAtt > 10) return; return setTimeout(function(){ manualTracking(path,query,emailAddress)},1000) } var e = { id: getId(), am: 'MjQzOTA=', host: document.location.host, origin: document.location.origin, pathname: nPath || document.location.pathname, query: nQs || document.location.search, hash: document.location.hash }; e = mpCheckLocalVars(e) if(nEmail) { e.emailAddress = nEmail } if(nCfields) { e.customFields = nCfields } if(nGroupId) { e.groupId = nGroupId } mpPostData(e); } function mpPostData(e) { var finalTrackerUrl = 'https://apiv2.mailvio.com/tracker'; // finalTrackerUrl = 'http://localhost:8081/tracker'; var xmlhttp if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST", finalTrackerUrl); xmlhttp.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); xmlhttp.send(JSON.stringify(e)) } function mpCheckLocalVars(vars) { if(typeof mpGroupId !== 'undefined') { vars.groupId = mpGroupId } if(typeof mpEmailAddress !== 'undefined') { if(mpEmailAddress.length && mpEmailAddress.indexOf(".") && mpEmailAddress.indexOf("@")) { vars.emailAddress = mpEmailAddress } } if(typeof mpCustomFields !== 'undefined') { if(typeof mpCustomFields == "object") { vars.customFields = mpCustomFields } } if(typeof mpPath !== 'undefined') { vars.pathname = mpPath; } if(typeof mpQuery !== 'undefined') { vars.query = mpQuery; } return vars; }