Facebook
From Burly Partdridge, 4 Months ago, written in C.
Embed
Download Paste or View Raw
Hits: 83
  1. var iol=iol||{};iol.iolcookcs={};iol.dmp2={};iol.track={};iol.iolcookcs.ready=function(a){if("complete"==document.readyState)return a();window.addEventListener?window.addEventListener("load",a,!1):window.attachEvent?window.attachEvent("onload",a):window.onload=a};iol.iolcookcs.ready(function(){});
  2. iol.iolcookcs.trackCookie=function(a){try{var b=("https:"==document.location.protocol?"https:":"http:")+"//privacy.italiaonline.it/common/cookie/api/set_policy_cookie.php?trvalue="+a+"&r="+Math.floor(10*Math.random()+1),c=document.createElement("IFRAME");c.setAttribute("src",b);c.style.width="0px";c.style.height="0px";c.style.display="none";window.setTimeout(function(){document.body.appendChild(c)},3E3)}catch(d){}};
  3. iol.iolcookcs.isCookieEnable=function(a){for(var b="DataRecs geo vlocal Advertising tmp1 tmp2 af xedge".split(" "),c="",d=document.cookie.split(";"),e=0;e<d.length;e++){for(var g=d[e];" "==g.charAt(0);)g=g.substring(1,g.length);0==g.indexOf("policy_cookie=")&&(c=g.substring(14,g.length))}if(null!=c&&""!=c){c=c.split("_")[0];d=null;for(index=0;index<b.length;++index)if(b[index]==a){d=index;break}a=null!=d?c.charAt(d):null}else return!0;return"1"==a?!0:!1};
  4. iol.dmp2.semtrackAsync=function(a){try{var b=iol.dmp2.detectbcp();if("undefined"!=typeof a.stes){if("string"==typeof a.stes.tag)b.add("genp","sem:"+a.stes.tag),iol.dmp2.log(a.stes.tag);else for(var c=0;c<a.stes.tag.length;c++)b.add("genp","sem:"+a.stes.tag[c]),iol.dmp2.log(a.stes.tag[c]);b.bcp()}else iol.dmp2.log("nessun val")}catch(d){iol.dmp2.log("semtrackAsync")}};
  5. iol.dmp2.semtrack=function(){try{iol.dmp2.log("Start semtrack "+document.location.href.length),"undefined"!=typeof iol.dmp2.detectbcp()?35<document.location.href.length&&(iol.dmp2.log("url OK"),iol.dmp2.getSemInfo()):iol.dmp2.log("sem stop bcp nt")}catch(a){iol.dmp2.log("semtrack")}};
  6. iol.dmp2.detectbcp=function(){var a;"undefined"!=typeof _cc6200?a=_cc6200:"undefined"!=typeof _cc6206?a=_cc6206:"undefined"!=typeof _cc6202?a=_cc6202:"undefined"!=typeof _cc6205?a=_cc6205:"undefined"!=typeof _cc6207?a=_cc6207:"undefined"!=typeof _cc6204?a=_cc6204:"undefined"!=typeof _cc6233?a=_cc6233:"undefined"!=typeof _cc6328?a=_cc6328:"undefined"!=typeof _cc6775?a=_cc6775:"undefined"!=typeof _cc6235?a=_cc6235:"undefined"!=typeof _cc6367?a=_cc6367:"undefined"!=typeof _cc6232?a=_cc6232:"undefined"!=
  7. typeof _cc6348?a=_cc6348:"undefined"!=typeof _cc8516?a=_cc8516:iol.dmp2.log("bcp non trovato");return a};iol.dmp2.getSemUrl=function(){try{var a=document.location.href;-1<a.indexOf("https://")&&(a="");-1<a.indexOf("?")&&(a=a.substring(0,a.indexOf("?")));iol.dmp2.log("clean "+a);if(""!=a)return"http://tuttosu.virgilio.it/all-about-api/tags_service_tutto_su.php?id="+encodeURIComponent(a)+"&format=jsonp&callback=iol.dmp2.semtrackAsync";iol.dmp2.log("http://tuttosu.virgilio.it/index.php");return""}catch(b){}};
  8. iol.dmp2.log=function(a){try{0<document.location.href.indexOf("log=true")&&console.log("[dmp]"+a)}catch(b){}};iol.dmp2.getSemInfo=function(){try{var a=this.getSemUrl();if(""!=a){var b=document.createElement("script");b.type="text/javascript";b.src=a;window.setTimeout(function(){try{document.body.appendChild(b)}catch(c){}},3E3)}}catch(c){iol.dmp2.log("getSemInfo")}};
  9. iol.dmp2.ack=function(a){var b=1;iol.dmp2.log("ack start "+a);"boolean"!==typeof a||a||(b="noCMP");a=("https:"==document.location.protocol?"https:":"http:")+"//privacy.italiaonline.it/common/cookie/api/set_policy_cookieCMT.php";b=a+"?value="+b+"&r="+Math.floor(10*Math.random()+1);var c=document.createElement("IFRAME");c.setAttribute("src",b);c.style.width="0px";c.style.height="0px";c.style.display="none";document.body.appendChild(c);iol.dmp2.log("ack end "+a)};
  10. iol.track.regTracking=function(){try{iol.dmp2.log("start timeout track"),35<document.location.href.length?window.setTimeout(function(){try{iol.track.Tracking()}catch(a){}},3E3):iol.dmp2.log("no track")}catch(a){iol.dmp2.log("regTracking")}};
  11. iol.track.Tracking=function(){try{iol.dmp2.log("track ");var a=window.location.href,b=document.referrer;-1<a.indexOf("?")&&(a=a.substring(0,a.indexOf("?")));b+="/";var c="";iol.dmp2.log("track referer "+b);iol.dmp2.log("track url "+a);if(-1!=b.indexOf("google.")||-1!=b.indexOf("bing.")){iol.dmp2.log("track seo ");var d="",e=b.indexOf("&q=");-1==e&&(e=b.indexOf("?q="));iol.dmp2.log("track seo 2 "+e);if(-1!=e){var g=b.indexOf("&",e+1);d=b.substring(e+1,g)+"&";d=d.replace("q=","q=seo_")}iol.dmp2.log("track seo 3 "+
  12. d);var k=b.indexOf("http://"),h=b.indexOf("/",7);-1==k&&(k=b.indexOf("https://"),h=b.indexOf("/",8),-1==h&&(h=b.length),iol.dmp2.log("track seo 3 https "+k+", "+h));var f=b.substring(0,h).replace("http://","").replace("https://","");try{-1!=f.indexOf("http")&&(f=10<f.length?"f"+f.substring(0,9):"f"+f)}catch(n){}""==d&&(d="q="+f+"&");c=d+"d="+f;iol.dmp2.log("track seo 4 "+c)}else if(b.indexOf("facebook.")||b.indexOf("twitter.")){iol.dmp2.log("track social ");k=b.indexOf("http://");h=b.indexOf("/",
  13. 7);-1==k&&(b.indexOf("https://"),h=b.indexOf("/",8));f=b.substring(0,h).replace("http://","").replace("https://","");try{-1!=f.indexOf("http")&&(f=10<f.length?"f"+f.substring(0,9):"f"+f)}catch(n){}c="q="+f+"&d="+f}e=d="";-1!=a.indexOf("dilei.it")?e="IVD_":-1!=a.indexOf("motori.virgilio.it")?e="IVM_":-1!=a.indexOf("quifinanza.it")?e="IVF_":-1!=a.indexOf("siviaggia.it")?e="IVV_":-1!=a.indexOf("supereva.it")?(a=a.replace(RegExp("-","g"),"/"),iol.dmp2.log("Adapting supereva -/"),e="ISE_"):-1!=a.indexOf("sportstadio.it")?
  14. e="IWN_":iol.dmp2.log("no dominio track");if(e)if(-1!=a.indexOf("/attachment/")){var l=a.indexOf("/attachment/");d=a.substring(a.lastIndexOf("/",l-1)+1,l).replace("/","")}else d=a.substring(a.lastIndexOf("/",a.length-2)+1).replace("/","");l=/^\d+$/;""==d||l.test(d)?d=e+d:(iol.dmp2.log("ID not detected"),d="");if(""!=d&&""!=b&&"http:"==document.location.protocol){var m=document.createElement("img");m.type="text/javascript";m.src="http://kpi.plug.it/tracks/bi/images/RT_A.gif?link="+a+"&"+c+"&id=C_"+
  15. d+"&rand="+Math.floor(1E7*Math.random()+1);iol.dmp2.log("track url.src "+m.src);document.body.appendChild(m)}}catch(n){iol.dmp2.log("Tracking")}};