1if (window.addEventListener) { 2 window.addEventListener('load', function(){ 3 // adjustIframeHeight(); 4 setUTM(); 5 // iframeResize(); 6 quantCastForEloqua(); 7 } , false); 8} else if (el.attachEvent) { 9 window.attachEvent('onload', function(){ 10 // adjustIframeHeight(); 11 setUTM(); 12 // iframeResize(); 13 quantCastForEloqua(); 14 }); 15} 16 17// iframe postmessage listener for UTMs 18document.addEventListener("DOMContentLoaded", function () { 19 setUTM(); 20 postMessageUTMsToIframes(); 21}); 22 23 24 25 26 27function setUTM(){ 28 var track_utm = []; 29 30 track_utm['utm_source'] = getParameterByName('utm_source'); 31 track_utm['utm_campaign'] = getParameterByName('utm_campaign'); 32 track_utm['utm_medium'] = getParameterByName('utm_medium'); 33 34 if( (track_utm['utm_source'] != '') && (track_utm['utm_source'] != null ) ) { 35 sessionStorage.setItem('track_utm_source', track_utm['utm_source']); 36 } 37 38 if( (track_utm['utm_campaign'] != '') && (track_utm['utm_campaign'] != null ) ) { 39 sessionStorage.setItem('track_utm_campaign', track_utm['utm_campaign']); 40 } 41 42 if( (track_utm['utm_medium'] != '') && (track_utm['utm_medium'] != null ) ) { 43 sessionStorage.setItem('track_utm_medium', track_utm['utm_medium']); 44 } 45 46} 47 48function postMessageUTMsToIframes(){ 49 var iframes = document.getElementsByClassName('iframe-uniform'); 50 51 for (var i = 0; i < iframes.length; i++) { 52 const iframe = iframes[i]; 53 const origin = new URL(iframe.src).origin; 54 55 if (iframe.src) { 56 iframe.addEventListener("load", function () { 57 if (this.contentWindow) { 58 this.contentWindow.postMessage({ 59 type: "utmsSessionStorage", 60 values: { 61 utm_source: sessionStorage.getItem("track_utm_source"), 62 utm_campaign: sessionStorage.getItem("track_utm_campaign"), 63 utm_medium: sessionStorage.getItem("track_utm_medium") 64 } 65 }, origin); 66 } 67 }); 68 } 69 } 70 71} 72 73function updateQueryStringParameter(uri, key, value) { 74 var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); 75 var separator = uri.indexOf('?') !== -1 ? "&" : "?"; 76 if (uri.match(re)) { 77 return uri.replace(re, '$1' + key + "=" + value + '$2'); 78 } 79 else { 80 return uri + separator + key + "=" + value; 81 } 82} 83 84function getParameterByName(name) { 85 86 name = name.replace(/[\[\]]/g, '\\$&'); 87 88 var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'); 89 var results = regex.exec(window.location.href); 90 91 if (!results) { 92 return null; 93 } 94 95 if (!results[2]) { 96 return ''; 97 } 98 99 100 return decodeURIComponent(results[2].replace(/\+/g, ' ')); 101} 102 103 104 105function quantCastForEloqua(){ 106 107 const eloqua_domains_sp = [ 108 'info.laley.es', 109 ]; 110 111 const eloqua_domains_pt = [ 112 'info.jusnet.pt', 113 ]; 114 115 for (var i = 0; i < eloqua_domains_sp.length; i++) { 116 if ( (window.location.href.indexOf(eloqua_domains_sp[i]) !== -1) || (window.location.href.includes(eloqua_domains_sp[i])) ) { 117 // console.log('quantcast for Eloqua SP'); 118 119 const script = document.createElement('script'); 120 script.src = 'https://www.aranzadilaley.es/quantcast_LL/quantcast-eloqua-sp.js'; 121 document.body.appendChild(script); 122 123 return true; 124 } 125 } 126 127 128 for (var i = 0; i < eloqua_domains_pt.length; i++) { 129 if ( (window.location.href.indexOf(eloqua_domains_pt[i]) !== -1) || (window.location.href.includes(eloqua_domains_pt[i])) ) { 130 // console.log('quantcast for Eloqua PT'); 131 132 const script = document.createElement('script'); 133 script.src = 'https://www.aranzadilaley.es/quantcast_LL/quantcast-eloqua-pt.js'; 134 document.body.appendChild(script); 135 136 return true; 137 } 138 } 139 140 return true; 141 142}
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.