if (typeof cs_btrid === 'undefined') { var cs_btrid = "7c07d8e4-fc92-4fa0-9d25-c1400b0c10b2"; } (function(){ var __ADPARTNER__ = "iy3yg8gl"; var __CACHEBUSTER__ = (Math.random() + "") * 10000000000000; var __COUNTRY__ = "co"; var __PROFILE_ID__ = cs_btrid; var __QUERYSTRING__ = "mode=2&p=iy3yg8gl&sid=2771&bt=&ref=https%3A%2F%2Fwww.eleconomista.es%2Fdiccionario-de-economia%2Ffinanzas"; var __SEGMENTS__ = "1026_1040_1043_1049_1507_1758_2140_2771_7229"; var __B2B__ = ""; var __TCS__ = ""; var __GEOREGION__ = ""; var __MAIN_SECTOR__ = ""; var __TTD_ID__ = "6ab3fa9f-fa30-474d-a8a9-949588924b4c"; var __APPNEXUS_ID__ = ""; var __ZH__ = ""; var __ZW__ = ""; var __CITY__ = ""; var __SEGMENTS_ARRAY__ = "s1026,s1040,s1043,s1049,s1507,s1758,s2140,s2771,s7229"; var ___SEGMENTS_ARRAY__ = "s1026,s1040,s1043,s1049,s1507,s1758,s2140,s2771,s7229"; var __ISP__ = ""; var __HOMETV__ = []; var ei_cookieid = __PROFILE_ID__; var cservi_seg = __SEGMENTS_ARRAY__; var d = new Date(); d.setTime(d.getTime() + 31556952000); var expires = "expires="+ d.toUTCString(); document.cookie = "btrseg=" + cservi_seg + ";" + expires + ";path=/"; window.googletag.cmd.push(function() { googletag.pubads().setPublisherProvidedId(ei_cookieid); }); })(); (function(){ var gdpr = "0"; var tcs = ""; var cookies = document.cookie.split("; "); for (i = 0; i < cookies.length; i++) { var parts = cookies[i].split("="); if (parts.length && parts[0] == "euconsent-v2") { tcs = parts[1]; break; } } if (cs_btrid === "7c07d8e4-fc92-4fa0-9d25-c1400b0c10b2") { if ((gdpr == "1" && tcs) || (gdpr == "0")) { } } })();  (function() { var md = new Date(); md.setTime(md.getTime() + (365 * 24 * 60 * 60 * 1000)); var domain = (function(){ var i = 0, domain = document.domain, p = domain.split('.'), s = '_gd' + (new Date()).getTime(); while (i < (p.length - 1) && document.cookie.indexOf(s + '=' + s) == -1) { domain = p.slice(-1 - (++i)).join('.'); document.cookie = s + "=" + s + ";domain=" + domain + ";"; } document.cookie = s + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=" + domain + ";"; return domain; })(); document.cookie = "_btrid=" + cs_btrid + ";expires=" + md.toUTCString() + ";path=/;domain=" + domain; })(); (function() { btrid = cs_btrid; window.localStorage.setItem('btrid', btrid); window.localStorage.setItem('csegment', "s1026,s1040,s1043,s1049,s1507,s1758,s2140,s2771,s7229"); })(); function getDiffDays(firstDate, secondDate) { diffTime = Math.abs(firstDate - secondDate); diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); return diffDays; } (function() { external_id = false; last_date = new Date(); last30 = new Date(); date_actual = new Date(); if (!window.localStorage.getItem(last30.toLocaleDateString())) { window.localStorage.removeItem("h"); window.localStorage.removeItem("hh"); window.localStorage.removeItem("ha"); } csus_rules = {'standard': 'ecousers/eleconomista', 'advanced': 'ecousers/eleconomista-advanced', 'custom': {'paths_home': '/,/home,/index,/index.html', 'advanced': {'1': {'hits': 1, 'days': 15, 'hits_home': 0}, '3': {'hits': 1, 'days': 7, 'hits_home': 1}, '2': {'hits': 1, 'days': 10, 'hits_home': 0}, '5': {'days_home': 4, 'hits': 1, 'requeriments': 'external_id', 'days': 3, 'hits_home': 7}, '4': {'hits': 1, 'days': 5, 'hits_home': 2}}, 'standard': {'1': {'hits': 1, 'days': 30}, '3': {'hits': 3, 'days': 30}, '2': {'hits': 2, 'days': 30}, '5': {'hits': 5, 'days': 30}, '4': {'hits': 4, 'days': 30}}}}; if (!window.localStorage.getItem("h")) { window.localStorage.setItem('h', 1); } else { window.localStorage.setItem('h', parseInt(window.localStorage.getItem("h"))+1); } current_user_standard = window.localStorage.getItem("ust") ? window.localStorage.getItem("ust") : 0; current_user_advandced = window.localStorage.getItem("usdv") ? window.localStorage.getItem("usdv") : 0; if (document.getElementsByTagName('html')[0].hasAttribute('amp') || document.getElementsByTagName('html')[0].hasAttribute('⚡')) { if (window.localStorage.getItem("ha")) { window.localStorage.setItem('ha', parseInt(window.localStorage.getItem("ha"))+1); } else { window.localStorage.setItem('ha', 1); } } var pathname = window.location.pathname; path_configs = "/,/home,/index,/index.html".split(","); if (path_configs.includes(pathname)) { if (window.localStorage.getItem("hh")) { window.localStorage.setItem('hh', parseInt(window.localStorage.getItem("hh"))+1); } else { window.localStorage.setItem('hh', 1); } } current_hits = window.localStorage.getItem("h") ? window.localStorage.getItem("h") : 0; hits_home = window.localStorage.getItem("hh") ? window.localStorage.getItem("hh") : 0; hits_amp = window.localStorage.getItem("ha") ? window.localStorage.getItem("ha") : 0; json_hits = { "h" : current_hits, "hh" : hits_home, "ha" : hits_amp }; window.localStorage.setItem(last30.toLocaleDateString(), JSON.stringify(json_hits)); last_30_h = 0; last_30_hh = 0; last_30_ha = 0; last30.setDate(last30.getDate() + 1); for (var d = new Date(last_date.setDate(last_date.getDate() - 30)); d.toLocaleDateString() != last30.toLocaleDateString(); d.setDate(d.getDate() + 1)){ if (window.localStorage.getItem(d.toLocaleDateString())) { if (window.localStorage.getItem('storageDates')) { if (!window.localStorage.getItem('storageDates').includes(d.toLocaleDateString())) { window.localStorage.setItem('storageDates', window.localStorage.getItem('storageDates')+";"+d.toLocaleDateString()); } } else { window.localStorage.setItem('storageDates', d.toLocaleDateString()); } last_30 = JSON.parse(window.localStorage.getItem(d.toLocaleDateString())); last_30_h += parseInt(last_30.h); last_30_hh += parseInt(last_30.hh); last_30_ha += parseInt(last_30.ha); json_last30 = { "h" : last_30_h, "hh" : last_30_hh, "ha" : last_30_ha }; window.localStorage.setItem('last_30', JSON.stringify(json_last30)); } } checkDates = window.localStorage.getItem('storageDates').split(";"); checkDates.forEach((element, index) => { var dateParts = element.split("/"); d = new Date(dateParts[2], dateParts[1] - 1, +dateParts[0]); diffDays = getDiffDays(d, last30); if ((diffDays - 1) > 30) { checkDates.splice(index, 1); window.localStorage.removeItem(element); } }); origin_us_st = current_user_standard; Object.entries(csus_rules.custom.standard).forEach(([user, value]) => { if (json_last30.h >= value.hits) { current_user_standard = user; } }); origin_us_adv = current_user_advandced; num_days = checkDates.length; Object.entries(csus_rules.custom.advanced).forEach(([user_adv, value]) => { min_num = value.hits * 30 / value.days; if (json_last30.h >= parseInt(min_num) && num_days >= parseInt(min_num) && user_adv != 5 && user_adv != 3 && user_adv != 4 && user_adv > origin_us_adv) { current_user_advandced = user_adv; } else if (json_last30.h >= parseInt(min_num) && json_last30.hh >= value.hits_home && num_days >= parseInt(min_num) && user_adv != 5 && user_adv > origin_us_adv) { current_user_advandced = user_adv; } else if (json_last30.h >= parseInt(min_num) && num_days >= parseInt(min_num) || json_last30.hh >= value.hits_home && num_days >= parseInt(min_num) || external_id) { current_user_advandced = user_adv; } }); window.localStorage.setItem('ust', current_user_standard); window.localStorage.setItem('usdv', current_user_advandced); if ((origin_us_adv != current_user_advandced || origin_us_st != current_user_standard) && (csus_rules.advanced != "/" && csus_rules.standard != "/")) { if (current_user_advandced != 0) { usadv = "usadv="+current_user_advandced; } else { usadv = ""; } if (current_user_standard != 0) { if (usadv == "") { ust = "ust="+current_user_standard; } else { ust = "&ust="+current_user_standard; } } else { ust = ""; } url = "https://dmp.citiservi.es/uscheck.js?"+usadv+ust+"&btrid=" + cs_btrid + "&sid=2771"; const client = new XMLHttpRequest(); client.open("GET", url); client.send(); } })();