var userAgent = navigator.userAgent.toLowerCase(); var isIE = ((userAgent.indexOf("msie") != -1) && (userAgent.indexOf("opera") == -1) && (userAgent.indexOf("webtv") == -1)); var sayuHiddenObjects = new Array(); var clientId = "24502"; var clickFD = 0; var clickAdMax = 5; var clickDisplay = "css"; var fraudCSS = "
\"\"
Thank you for visiting our website - we are very glad you find it useful.

We have noticed that you have visited our site many times recently by clicking on adverts. In order to keep costs down and make sure that we can pass the savings on to you, our customer, we would like to ask that you bookmark our site.

To bookmark our site, please click here.

Please note that your IP address has been logged: 52.14.2.0
\"\"
\"\"Invalid click detection provided by Sayu Ltd. www.sayu.co.uk
"; var scriptURL = "https://www.sayutracking.co.uk/"; var parentId = ""; var visitId = ""; var visitNo = ""; var currentURL = parent.location.href; var pageURL = window.location.href; if (currentURL == "") { currentURL = pageURL; } var urlParam = currentURL; var referrerURL = parent.document.referrer; if (referrerURL == "") { referrerURL = document.referrer; } var queryParams = new Array(); var kwParam = ""; var flParam = ""; var ciParam = ""; var networkParam = ""; var tfParam = ""; var kwIdParam = "";var pmParam = ""; var visitId = getSayuCookie("sessionVisit" + clientId); var cookieVisit = getSayuCookie("cookieVisit" + clientId); if (cookieVisit != "") { var visitInfo = cookieVisit.split("|"); parentId = visitInfo[0]; visitNo = parseInt(visitInfo[1]); } else { visitNo = 0; } // new visit if (visitId == "") { visitId = "0"; visitNo++; } // count clicks var clickNumber = parseInt(getSayuCookie("sessionClick" + clientId)); if (isNaN(clickNumber) || clickNumber == "" || clickNumber == 0) { clickNumber = 1; } else { clickNumber = clickNumber + 1; } setSayuCookie("sessionClick" + clientId, clickNumber, 0); var dn = getSayuDomain(); var questionMark = currentURL.indexOf("?"); if (questionMark == -1) { questionMark = currentURL.indexOf("#"); } var slashPosition = currentURL.lastIndexOf("/"); var pageName = ""; if (questionMark != -1) { pageName = currentURL.substring(slashPosition + 1, questionMark); var queryString = currentURL.substring(questionMark + 1, currentURL.length); var queryParts = queryString.split("&"); for (var i = 0; i < queryParts.length; i++) { var paramName = ""; var paramValue = ""; var queryPart = queryParts[i]; var equalSign = queryPart.indexOf("="); if (equalSign == -1) { paramName = queryPart; } else { paramName = queryPart.substring(0, equalSign); if (paramName.length > 4 && paramName.substring(0, 4) == "amp;") { paramName = paramName.substring(4); } paramValue = unescape(queryPart.substring(equalSign + 1, queryPart.length)); queryParams[paramName] = paramValue; if (paramName == "kw") { kwParam = paramValue; } else if (paramName == "fl" && flParam == "") { flParam = paramValue; } else if (paramName == "ci" && ciParam == "") { ciParam = paramValue; } else if (paramName == "network" && networkParam == "") { networkParam = paramValue; } else if (paramName == "pm" && pmParam == "") { pmParam = paramValue; } else if (paramName == "testfraud") { tfParam = paramValue; } else if (paramName == "OVKEY") { // Yahoo Search Marketing tracking kwParam = paramValue; //if (flParam == "") { flParam = 10000; //} } else if (paramName == "OVADID") { // Yahoo Search Marketing tracking ciParam = paramValue; } else if (paramName == "OVMTC") { // Yahoo Search Marketing tracking networkParam = (paramValue == "content")?"c":"s"; } else if (paramName == "OVKWID") { kwIdParam = paramValue; } } } } else { pageName = currentURL.substring(slashPosition + 1, currentURL.length); } if (queryParams["clear_sayu_cookies"] && queryParams["clear_sayu_cookies"] == 1) { setSayuCookie("cookieAdClick" + clientId, "", 0); setSayuCookie("cookieFl" + clientId, "", 0); setSayuCookie("cookieKw" + clientId, "", 0); setSayuCookie("cookieCi" + clientId, "", 0); setSayuCookie("cookieNetwork" + clientId, "", 0); setSayuCookie("cookieKwId" + clientId, "", 0); setSayuCookie("cookiePm" + clientId, "", 0); setSayuCookie("sessionFl" + clientId, "", 0); setSayuCookie("sessionKw" + clientId, "", 0); setSayuCookie("sessionCi" + clientId, "", 0); setSayuCookie("sessionNetwork" + clientId, "", 0); setSayuCookie("sessionKwId" + clientId, "", 0); setSayuCookie("sessionPm" + clientId, "", 0); } var fraudParam = 0; var adClick = 0; if (queryParams["sayu_transfer"] && queryParams["sayu_transfer"] == 1) { // get transfered parameters visitId = queryParams["sayu_vid"]; parentId = queryParams["sayu_pv"]; visitNo = queryParams["sayu_vn"]; setSayuCookie("sessionVisit" + clientId, visitId, 0); setSayuCookie("cookieVisit" + clientId, parentId + "|" + visitNo, 3600 * 24 * 366); // count clicks clickNumber = parseInt(queryParams["sayu_cn"]); clickNumber = clickNumber + 1; setSayuCookie("sessionClick" + clientId, clickNumber, 0); // save ad clicks info if (queryParams["sayu_ac"]) { setSayuCookie("cookieAdClick" + clientId, queryParams["sayu_ac"], 3600 * 24 * 366); } // save fast link info in cookies and session to prevent new visit record if (queryParams["sayu_fl"]) { setSayuCookie("cookieFl" + clientId, queryParams["sayu_fl"], 3600 * 24 * 366); setSayuCookie("sessionFl" + clientId, queryParams["sayu_fl"], 0); } if (queryParams["sayu_kw"]) { setSayuCookie("cookieKw" + clientId, queryParams["sayu_kw"], 3600 * 24 * 366); setSayuCookie("sessionKw" + clientId, queryParams["sayu_kw"], 0); } if (queryParams["sayu_ci"]) { setSayuCookie("cookieCi" + clientId, queryParams["sayu_ci"], 3600 * 24 * 366); setSayuCookie("sessionCi" + clientId, queryParams["sayu_ci"], 0); } if (queryParams["sayu_network"]) { setSayuCookie("cookieNetwork" + clientId, queryParams["sayu_network"], 3600 * 24 * 366); setSayuCookie("sessionNetwork" + clientId, queryParams["sayu_network"], 0); } if (queryParams["sayu_kwid"]) { setSayuCookie("cookieKwId" + clientId, queryParams["sayu_kwid"], 3600 * 24 * 366); setSayuCookie("sessionKwId" + clientId, queryParams["sayu_kwid"], 0); } if (queryParams["sayu_pm"]) { setSayuCookie("cookiePm" + clientId, queryParams["sayu_pm"], 3600 * 24 * 366); setSayuCookie("sessionPm" + clientId, queryParams["sayu_pm"], 0); } } if (flParam == "" && tfParam == "") { // get for new visit old fast link data if its available flParam = getSayuCookie("cookieFl" + clientId); kwParam = getSayuCookie("cookieKw" + clientId); ciParam = getSayuCookie("cookieCi" + clientId); networkParam = getSayuCookie("cookieNetwork" + clientId); kwIdParam = getSayuCookie("cookieKwId" + clientId); pmParam = getSayuCookie("cookiePm" + clientId); } var jsSrc = "landing.js?client_id=" + clientId; jsSrc += "&vid=" + visitId; jsSrc += "&cn=" + clickNumber; if (flParam != "") { setSayuCookie("cookieKw" + clientId, kwParam, 3600 * 24 * 366); setSayuCookie("cookieFl" + clientId, flParam, 3600 * 24 * 366); setSayuCookie("cookieCi" + clientId, ciParam, 3600 * 24 * 366); setSayuCookie("cookieNetwork" + clientId, networkParam, 3600 * 24 * 366); setSayuCookie("cookieKwId" + clientId, kwIdParam, 3600 * 24 * 366); setSayuCookie("cookiePm" + clientId, pmParam, 3600 * 24 * 366); var sessFl = getSayuCookie("sessionFl" + clientId); var sessKw = getSayuCookie("sessionKw" + clientId); var sessCi = getSayuCookie("sessionCi" + clientId); var sessNetwork = getSayuCookie("sessionNetwork" + clientId); var sessKwId = getSayuCookie("sessionKwId" + clientId); var sessPm = getSayuCookie("sessionPm" + clientId); // pass fast link data only for new visit and new clicks var sameDR = false; var dr = /^http[s]?\:\/\/(?:www\.|ssl\.|secure\.|)([^\/]+)(?:\/|$)/; var r = referrerURL.match(dr); if (r && r[1] == dn) { sameDR = true; } if (!sameDR && (sessFl != flParam || sessKw != kwParam || sessCi != ciParam || sessNetwork != networkParam || sessPm != pmParam)) { adClick = parseInt(getSayuCookie("cookieAdClick" + clientId)); if (isNaN(adClick) || adClick == "" || adClick == 0) { adClick = 1; } else { adClick = adClick + 1; } setSayuCookie("cookieAdClick" + clientId, adClick, 3600 * 24 * 366); jsSrc += "&fl=" + flParam + "&kw=" + escape(kwParam).replace(/\+/g,"%2B") + "&ci=" + ciParam + "&network=" + networkParam; jsSrc += "&kwid=" + kwIdParam + "&pm=" + pmParam + "&ac=" + adClick; } } if ((flParam != "" && clickFD != 0 && adClick > clickAdMax) || tfParam == "css" || tfParam == "redir" || tfParam == "popup") { if (tfParam == "css" || tfParam == "redir" || tfParam == "popup") { clickDisplay = tfParam; } if (clickDisplay == "redir") { fraudParam = 1; if (tfParam == "redir") { parent.location.href = scriptURL + "fraud_win.php?client_id=" + clientId+ "&u=" + escape(urlParam) + "&tf=redir"; } } else if (clickDisplay == "popup") { var popupURL = scriptURL + "fraud_win.php?client_id=" + clientId+ "&u=" + escape(urlParam); if (tfParam == "popup") { popupURL += "&tf=popup"; } var popupWin = window.open(popupURL, "fraudWin", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=350,height=250"); popupWin.focus(); } else { // css var topPos = 200; var leftPos = 300; var availWidth = window.screen.availWidth; if (availWidth && availWidth > 0) { leftPos = availWidth / 2 - 150; } sayuHideObjects(); if (document.body.insertAdjacentHTML) { document.body.insertAdjacentHTML("afterBegin", fraudCSS); } else { document.write(fraudCSS); } } } if (parentId != "") { jsSrc += "&pv=" + parentId + "&vn=" + visitNo; } if (urlParam != "") { jsSrc += "&u=" + escape(urlParam); if (pageURL != "" && urlParam != pageURL) { jsSrc += "&p=" + escape(pageURL); } } if (referrerURL != "") { jsSrc += "&ref=" + escape(referrerURL); } if (fraudParam == 1) { jsSrc += "&fraud=1"; } if (referrerURL != "") { jsSrc += "&tf=" + escape(tfParam); } document.write (""); function getSayuDomain() { var dn = document.domain; if (dn.substring(0,4)=="www." || dn.substring(0,4)=="ssl.") { dn=dn.substring(4,dn.length); } else if (dn.substring(0,7)=="secure.") { dn=dn.substring(7,dn.length); } return dn; } function sayuShowObjects(){ if (sayuHiddenObjects && sayuHiddenObjects.length > 0) { for (var i = 0; i < sayuHiddenObjects.length; i++) { sayuHiddenObjects[i].style.visibility = "visible"; } } } function sayuHideObjects(){ if (isIE) { var objectsNames = new Array("select", "object", "iframe"); } else { var objectsNames = new Array("object", "iframe"); } for (n = 0; n < objectsNames.length; n++) { var objectName = objectsNames[n]; var objects = document.getElementsByTagName(objectName); for (i = 0; i < objects.length; i++) { var objectControl = objects[i]; if (objectControl.style.visibility != "hidden") { sayuHiddenObjects[sayuHiddenObjects.length] = objectControl; objectControl.style.visibility = "hidden"; } } } } function hideSayuWin() { var winObj = document.getElementById("fraud_win"); var shadowObj = document.getElementById("fraud_win_shadow"); if (shadowObj) { shadowObj.style.display = "none"; } if (winObj) { winObj.style.display = "none"; } sayuShowObjects(); } function setSayuCookie(name, value, seconds, path, domain, secure) { var _ad = true; // auto set domain name var cookie = name + "=" + escape(value); if (seconds > 0) { var today = new Date(); var expire = new Date(); expire.setTime(today.getTime() + 1000 * seconds); cookie += "; expires=" + expire.toGMTString(); } //if (path) { cookie += "; path=" + path; } cookie += "; path=/"; if (domain) { cookie += "; domain=" + domain; } else if (typeof(__sayuCookieBaseDomain) != "undefined") { if (__sayuCookieBaseDomain != "") { cookie += "; domain=" + __sayuCookieBaseDomain; } } else if (_ad) { var dn = getSayuDomain(); if (dn != "localhost") { cookie += "; domain=" + dn; } } if (secure) { cookie += "; secure"; } document.cookie = cookie; } function getSayuCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return ""; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } function transferSayuData(source, type) { var url = ""; if (type == "form") { url = source.action; } else if (type == "link") { url = source.href; } else { // string type processing url = source; } var parentId = ""; var visitNo = ""; var cookieVisit = getSayuCookie("cookieVisit" + clientId); if (cookieVisit != "") { var visitInfo = cookieVisit.split("|"); parentId = visitInfo[0]; visitNo = parseInt(visitInfo[1]); } url = addSayuParam(url, "sayu_transfer", "1"); url = addSayuParam(url, "sayu_vid", getSayuCookie("sessionVisit" + clientId)); url = addSayuParam(url, "sayu_pv", parentId); // parent visit url = addSayuParam(url, "sayu_vn", visitNo); // visit number url = addSayuParam(url, "sayu_fl", getSayuCookie("sessionFl" + clientId)); // fast link url = addSayuParam(url, "sayu_kw", getSayuCookie("sessionKw" + clientId)); // keyword url = addSayuParam(url, "sayu_ci", getSayuCookie("sessionCi" + clientId)); // creative id url = addSayuParam(url, "sayu_network", getSayuCookie("sessionNetwork" + clientId)); // network url = addSayuParam(url, "sayu_kwid", getSayuCookie("sessionKwId" + clientId)); // keyword id url = addSayuParam(url, "sayu_ac", getSayuCookie("cookieAdClick" + clientId)); // ad clicks url = addSayuParam(url, "sayu_cn", getSayuCookie("sessionClick" + clientId)); // session click number url = addSayuParam(url, "sayu_pm", getSayuCookie("sessionPm" + clientId)); // placement if (type == "form") { source.action = url; } else if (type == "link") { // string type processing source.href = url; } else { return url; } } function addSayuParam(url, newParamName, newParamValue) { var grateMark = url.indexOf("#"); var questionMark = url.indexOf("?"); var grateUrl = ""; var queryString = ""; if (grateMark != -1) { grateUrl = url.substring(grateMark + 1, url.length); url = url.substring(0, grateMark); } if (questionMark != -1) { queryString = url.substring(questionMark + 1, url.length); url = url.substring(0, questionMark); } var i = 0; var newQueryString = ""; var newParamFound = false; if (queryString.length > 0) { var queryParts = queryString.split("&"); for (i = 0; i < queryParts.length; i++) { var paramName = ""; var paramValue = ""; var queryPart = queryParts[i]; var equalSign = queryPart.indexOf("="); if (equalSign == -1) { paramName = queryPart; } else { paramName = queryPart.substring(0, equalSign); paramValue = unescape(queryPart.substring(equalSign + 1, queryPart.length)); } newQueryString += (i == 0) ? "?" : "&"; newQueryString += paramName + "="; if (paramName == newParamName) { newQueryString += escape(newParamValue); newParamFound = true; } else { newQueryString += escape(paramValue); } } } if (!newParamFound) { newQueryString += (i == 0) ? "?" : "&"; newQueryString += newParamName + "=" + escape(newParamValue); } url += newQueryString; if (grateMark != -1) { url += "#" + grateUrl; } return url; } function sayuClearConvValue(value) { var _cv = ""; var decimals = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "-"); var _cvLen = value.length; if (_cvLen > 0) { for(var i = 0; i < _cvLen; i++) { if (sayuLookUpElement(decimals, value.charAt(i)) >= 0) { _cv += value.charAt(i); } } } return _cv; } function sayuLookUpElement(arr, element) { if (arr != null) { for(i = 0; i < arr.length; i++) { if (arr[i] == element) { return i; } } } return -1; } function sayuSaveConversion(_cvParam) { var cvParam = parseFloat(sayuClearConvValue(_cvParam)); var currDate = new Date(); var cvT = parseInt(currDate.getTime()/1000); var sameCvValueDelay = 300; var zeroCvValueDelay = 120; var cookieConversion = getSayuCookie("cookieConversion" + clientId); var prevCv = 0; var prevT = 0; var cvInfo = cookieConversion.split("|"); if (cvInfo.length == 2) { prevCv = parseFloat(cvInfo[1]); prevT = parseInt(cvInfo[0]); } var isConversion = true; if (cvParam == 0) { if (cvT - prevT < zeroCvValueDelay) { isConversion = false; } } else { if (cvParam == prevCv && cvT - prevT < sameCvValueDelay) { isConversion = false; } } if (isConversion) { var visitId = ""; var parentId = 0; var visitNo = 1; visitId = getSayuCookie("sessionVisit" + clientId); if (visitId == "") { visitId = 0; } var cookieVisit = getSayuCookie("cookieVisit" + clientId); if (cookieVisit != "") { var visitInfo = cookieVisit.split("|"); parentId = visitInfo[0]; visitNo = visitInfo[1]; } var queryParams = new Array(); var currentURL = parent.location.href; if (currentURL == "") { currentURL = window.location.href; } var questionMark = currentURL.indexOf("?"); if (questionMark != -1) { var queryString = currentURL.substring(questionMark + 1, currentURL.length); var queryParts = queryString.split("&"); for (var i = 0; i < queryParts.length; i++) { var paramName = ""; var paramValue = ""; var queryPart = queryParts[i]; var equalSign = queryPart.indexOf("="); if (equalSign == -1) { paramName = queryPart; } else { paramName = queryPart.substring(0, equalSign); paramValue = unescape(queryPart.substring(equalSign + 1, queryPart.length)); queryParams[paramName] = paramValue; if (paramName == "cv") { cvParam = paramValue; } } } } setSayuCookie("cookieConversion" + clientId, cvT + "|" + cvParam, 3600 * 24 * 366); var jsSrc = "conversion.js?client_id=" + clientId; jsSrc += "&vid=" + visitId; jsSrc += "&pv=" + parentId + "&vn=" + visitNo; if (cvParam != "") { jsSrc += "&cv=" + cvParam; } if (currentURL != "") { jsSrc += "&u=" + escape(currentURL); } //document.write (""); var e = document.createElement("script"); e.src = "https://www.sayutracking.co.uk/" + jsSrc; e.type="text/javascript"; var elements = document.getElementsByTagName("body"); if (elements.length > 0) { var element = elements[0]; if (element != null) { element.appendChild(e); } } } }