function Audience() { if ("undefined" === typeof window.data_C679934) { window.data_C679934 = []; if ("undefined" !== typeof rtgsettings) { window.data_C679934.push(rtgsettings) } else { if ("undefined" !== typeof window.data_0001) { window.data_C679934 = window.data_0001 } } } if ("undefined" === typeof window.data_C679934) { return } else { if (window.data_C679934.length === 0) { window.data_C679934.push({ pagetype: "generic", PageType: "generic" }) } } var o = window.data_C679934; window.data_C679934 = []; window.data_C679934.push(o[o.length - 1]); CUDV(); var p = ""; var v = "dhgate"; var n = ""; var f = ""; var c = "C679934"; var e = "0"; var r = ""; var w = ""; w = null !== window.data_C679934[0].pdt_url && "undefined" !== window.data_C679934[0].pdt_url && Object !== window.data_C679934[0].pdt_url && undefined !== window.data_C679934[0].pdt_url && "" !== window.data_C679934[0].pdt_url && !window.data_C679934[0].pdt_url.toString().includes("$") ? encodeURIComponent(window.data_C679934[0].pdt_url) : encodeURIComponent(window.location.href); var h = window.data_C679934[0].Currency; if (urlcheck(h, "Currency")) { h = "" } if (lengthcheck(h) > 600) { h = h.toString().substring(0, 600) } var i = window.data_C679934[0].CustomerType; if (urlcheck(i, "CustomerType")) { i = "" } if (lengthcheck(i) > 600) { i = i.toString().substring(0, 600) } var u = window.data_C679934[0].ProductId; if (urlcheck(u, "ProductId")) { u = "" } if (lengthcheck(u) > 600) { u = u.toString().substring(0, 600) } var t = window.data_C679934[0].ProductCategoryList; if (urlcheck(t, "ProductCategoryList")) { t = "" } if (lengthcheck(t) > 600) { t = t.toString().substring(0, 600) } var g = window.data_C679934[0].CouponCode; if (urlcheck(g, "CouponCode")) { g = "" } if (lengthcheck(g) > 600) { g = g.toString().substring(0, 600) } var s = window.data_C679934[0].PageType; s = PagetypeFinder("home", "category", "product", "basket", "checkout,thankyou", s); r = s; var k = window.data_C679934[0].gdpr; if (urlcheck(k, "gdpr")) { k = "" } if (lengthcheck(k) > 600) { k = k.toString().substring(0, 600) } var l = window.data_C679934[0].gdpr_consent; if (urlcheck(l, "gdpr_consent")) { l = "" } if (lengthcheck(l) > 600) { l = l.toString().substring(0, 600) } var m = window.data_C679934[0].gdpr_pd; if (urlcheck(m, "gdpr_pd")) { m = "" } if (lengthcheck(m) > 600) { m = m.toString().substring(0, 600) } var x = window.data_C679934[0].us_privacy; if (urlcheck(x, "us_privacy")) { x = "" } if (lengthcheck(x) > 600) { x = x.toString().substring(0, 600) } var q = window.data_C679934[0].OrderId; if (urlcheck(q, "OrderId")) { q = "" } if (lengthcheck(q) > 600) { q = q.toString().substring(0, 600) } var b = window.data_C679934[0].Amount; if (urlcheck(b, "Amount")) { b = "" } if (lengthcheck(b) > 600) { b = b.toString().substring(0, 600) } var d = window.data_C679934[0].Browsercheck; d = checkBrowser(); var a = window.data_C679934[0].a15; a = auditcheck(v, r); var j = window.data_C679934[0].dw15; j = dw(); aN = auditchecklive(v, r); refU='' try{ refU=encodeURIComponent(document.referrer); }catch(e){} p = "&ProgramName=" + v + "&AudienceId=" + c + "&CampaignId=" + e + "&Referrer=" + w + "&Currency=" + h + "&CustomerType=" + i + "&ProductId=" + u + "&ProductCategoryList=" + t + "&CouponCode=" + g + "&PageType=" + s + "&gdpr=" + k + "&gdpr_consent=" + l + "&gdpr_pd=" + m + "&us_privacy=" + x + "&OrderId=" + q + "&Amount=" + b + "&Browsercheck=" + d + "&a15=" + a + "&dw15=" + j; p = p.replace(/[^=&]+=(&|$)/g, "").replace(/&$/, ""); if ((s == "product" || s == "basket" || s == "home") && (a == "false" && j == "false")) { CAU("CAU33348", "https://s2sclick.com/r.php?type=3&token=dhgate&pagetype=" + s + "&ref=" + w+ "&auditchk=" + aN+ "&rfn=" + refU+p , v, s) }else{ } } function CDV(a) { var b = document.getElementById("m20DBY"); b.appendChild(a) } function CAU(a, e, d, b) { var c = document.createElement("script"); c.id = a, c.type = "text/javascript", c.src = e, CDV(c) } function CIG(a, c) { var b = document.createElement("img"); b.id = a, b.width = 1, b.height = 1, b.src = c, CDV(b) } function CST(a, c) { var b = document.createElement("script"); b.id = a, b.type = "text/javascript", b.src = c, CDV(b) } function CAU(a, e, d, b) { var c = document.createElement("script"); c.id = a, c.type = "text/javascript", c.src = e, CDV(c) } function CIF(a, c) { } function FDV(a) { document.body.appendChild(a) } function CUDV() { var a = document.createElement("div"); a.id = "m20DBY", a.style.display = "none", FDV(a) } function urlcheck(b, c) { var a = true; if (b != undefined && (b.toString().toLowerCase().indexOf("undefined") < 0) && (c != undefined || !isNaN(c))) { a = b.toString().includes(c) } else { a = true } return a } function lengthcheck(b) { var a = b.toString().length; return a } function diff_hours(a, c) { try { var b = (a.getTime() - c.getTime()) / 1000; return b /= 3600, Math.abs(Math.round(b)) } catch (a) { return 6 } } function chkses(a) { return "undefined" === typeof Storage || !sessionStorage.getItem(a) } function chk(a, b) { var c = !1; return ("undefined" == typeof Storage || !localStorage.getItem(a) || 3 < diff_hours(new Date, new Date(localStorage.getItem(a)))) && (c = !0), !!c && chkses(a + "-" + b) } function checkBrowser() { var a = "true"; if ((navigator.userAgent.toLowerCase().indexOf("safari") > -1) && (navigator.userAgent.toLowerCase().indexOf("chrome") < 0)) { a = "false" } else { if (navigator.userAgent.toLowerCase().indexOf("firefox") > -1) { a = "false" } else { if (navigator.userAgent.toLowerCase().indexOf("iphone") > -1) { a = "false" } else { if (navigator.userAgent.toLowerCase().indexOf("mac os") > -1) { a = "false" } else { if (navigator.userAgent.toLowerCase().indexOf("facebook") > -1) { a = "false" } else { if (navigator.userAgent.toLowerCase().indexOf("googlebot") > -1) { a = "false" } } } } } } return a } function PagetypeFinder(d, b, f, a, c, e) { var g = e.toLowerCase(); if (d.toLowerCase().includes(g)) { return "home" } else { if (b.toLowerCase().includes(g)) { return "category" } else { if (f.toLowerCase().includes(g)) { return "product" } else { if (a.toLowerCase().includes(g)) { return "basket" } else { if (c.toLowerCase().includes(g)) { return "checkout" } else { return "generic" } } } } } } function auditcheck(d, c) { var a = ["=tik", "facebook", "instagram", "google", "amazon", "ao-qa.com", "utm", "?f=", "tagtag_uid", "?ref=", "&amc=", "=bing", "=fb", "=email", "=Impact"]; var e = "false"; for (var b in a) { if (window.location.href.indexOf(a[b]) > -1) { if (typeof(Storage) !== "undefined") { localStorage.setItem(d.toLowerCase(), new Date) } e = "true" } } if (!chk(d.trim().toLowerCase(), c)) { e = "true" } var e = "false"; return e } function auditchecklive(d, c) { var a = ["=tik", "facebook", "instagram", "google", "amazon", "ao-qa.com", "utm", "?f=", "tagtag_uid", "?ref=", "&amc=", "=bing", "=fb", "=email", "=Impact"]; var e = "false"; for (var b in a) { if (window.location.href.indexOf(a[b]) > -1) { if (typeof(Storage) !== "undefined") { localStorage.setItem(d.toLowerCase(), new Date) } e = "true" } } if (!chk(d.trim().toLowerCase(), c)) { e = "true" } return e } function dw() { var b = window.outerWidth - window.innerWidth > 130; var a = window.outerHeight - window.innerHeight > 130; if (!(a && b) && ((window.Firebug && window.Firebug.chrome && window.Firebug.chrome.isInitialized) || b || a)) { return "false" } else { return "false" } } Audience();