/* Updated 2019/06/07,T */ /* Updated 2019/06/03,T */ /* Updated 2019/05/08,T */ /* Updated 2020/03/09,T */ /**************************************** Karte *****************************************/ (function(){ //Karte情報送信 //セッションID取得 function getCookie(key){ var cookieKey = key + "=", val = null, cookie = document.cookie + ";", index = cookie.indexOf(cookieKey); if (index != -1) { var endIndex = cookie.indexOf(";", index); val = decodeURIComponent(cookie.substring(index + cookieKey.length, endIndex)); } return val; } var idCheck = 'vis-' + getCookie('krt.vis'); //情報送信 cvKarte = function(eventCheck,nameCheck){ try { var btnName = '店舗・ATM検索_' + nameCheck; tracker.track("smbcemap_cv",{ button_name: btnName, event_name: eventCheck, user_id: idCheck }); }catch(e){} }; //情報送信後に遷移 タイムラグ対策 try { window.addEventListener('DOMContentLoaded', function () { var selector01 = document.querySelectorAll('a[onclick^="cvKarte("]'), check01 = selector01.length; if (check01 >= 1) { for(var i = 0; i < check01; i++) { selector01[i].addEventListener('click', function(e){ var target = this.getAttribute('target'); if(target !== '_blank'){ e.preventDefault(); var checkHref = this.getAttribute('href'), checkHrefSP = this.getAttribute('data-sphref'); setTimeout(function(){ if(checkHrefSP !== null && window.innerWidth <= 767){ if(target === '_top') { top.location.href = checkHrefSP; } else { window.location.href = checkHrefSP; } } else { if(target === '_top') { top.location.href = checkHref; } else { window.location.href = checkHref; } } },100); } }); } } }); }catch(e){} }());