if (!window._mpPost) { transPageChange(); } function transPageChange(transEmail, transCustomFields, transGroupId, nHost, nOrigin, nUuid) { var o = transGetId(); let dReferrer = ""; if (document && document.referrer) dReferrer = document.referrer; var e = { id: nUuid || o, am: '6', host: nHost || document.location.host, origin: nOrigin || document.location.origin, pathname: document.location.pathname, query: document.location.search, hash: document.location.hash, referrer: nOrigin || dReferrer }; if (transEmail) e.emailAddress = transEmail if (transCustomFields) e.customFields = transCustomFields; if (transGroupId) e.groupId = transGroupId; e = mpCheckLocalVars(e); mpPostData(e); } function transGetId() { var o="065429ea-f7b3-4d86-b9da-eb2865c80a3b" , t = function(o) { var t = document.cookie.match(new RegExp("(^| )" + o + "=([^;]+)")); if (t) { return t[2]; } else { try { var found = document.cookie.split(';').find(c => c.indexOf(o + '=') > -1); if (found) return found.split('=')[1]; } catch (e) { } } }("mpz"); t ? o = t : document.cookie = "mpz=065429ea-f7b3-4d86-b9da-eb2865c80a3b;expires=Fri, 31 Dec 9999 23:59:59 GMT;lSameSite=Lax"; return o; }; var mpJqAtt = 0; function manualTracking(nPath,nQs,nEmail,nCfields,nGroupId,nEventName,nEventData, nUuid, nHost, nOrigin) { var e = { id: nUuid || transGetId(), am: '6', host: nHost || document.location.host, origin: nOrigin || 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 } if(nEventName) { e.eventName = nEventName; } if(nEventData) { e.eventData = nEventData; } mpPostData(e); } function mpPostData(e) { var finalTrackerUrl = 'https://api.transpond.io/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; } window._mpPost = manualTracking;