1/**************** GEL_MAPA_POLOS ****************/ 2 3/** 4 * SECTION MAP 5 */ 6 7let poles_map = document.getElementsByClassName('regioes desktop'); 8 9for (let div of poles_map){ 10 let states = div.getElementsByTagName('a'); 11 12 for (let state of states){ 13 state.addEventListener('click', event => { 14 if (debug) {event.preventDefault()} 15 let state_name = event.target.innerText; 16 17 obj = { 18 'event': 'gaEvent', 19 'eventCategory': 'infraestrutura', 20 'eventAction': 'click', 21 'eventLabel': `polo-de-apoio-${state_name}` 22 } 23 dataLayer.push(obj); 24 25 if (debug) {console.log(JSON.stringify(obj, null, 4));} 26 27 }) 28 } 29 30 31} 32 33/** 34 * SECTION CIDADES 35 */ 36 37let state_select = document.getElementById('estado'); 38 39state_select.addEventListener('click', event => { 40 41 if (event.target.tagName == 'A'){ 42 if (debug) {event.preventDefault()} 43 let state_name = cleanBtnName(event.target.innerText); 44 45 obj = { 46 'event': 'gaEvent', 47 'eventCategory': 'infraestrutura', 48 'eventAction': 'click', 49 'eventLabel': `outras-cidades-${state_name}` 50 } 51 dataLayer.push(obj); 52 53 if (debug) {console.log(JSON.stringify(obj, null, 4));} 54 } 55 56}) 57 58console.log('%c--> GEL_MAPA_POLOS LOADED!', 'background: white; color: purple'); 59 60/**************** END-GEL_MAPA_POLOS ****************/
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.