1 2 3function CriteoTag(){ 4 this.itemId; 5} 6 7CriteoTag.prototype = { 8 getDeviceType : function(){ 9 var ua = navigator.userAgent; 10 if(ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0){ 11 return 'm'; 12 }else if(ua.indexOf('iPad') > 0 || ua.indexOf('Android') > 0 || ua.indexOf('Kindle') > 0 || ua.indexOf('Silk') > 0){ 13 return 't'; 14 }else{ 15 return 'd'; 16 } 17 }, 18 getTransactionId : function(){ 19 return Math.floor(Math.random()*99999999999); 20 }, 21 getItemId : function(){ 22 // CriteoååIDã®åå¾ 23 var cookies = document.cookie.split(";") 24 for (let index = 0; index < cookies.length; index++) { 25 const cookie = cookies[index]; 26 var result = cookie.indexOf("criteoItemId"); 27 if(result != -1) 28 { 29 return cookie.split("=")[1]; 30 } 31 } 32 }, 33 setItemId : function(itemId){ 34 document.cookie = "criteoItemId=" + itemId + "; path=/"; 35 } 36} 37var CriteoTag = new CriteoTag(); 38 39
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.