1/** 2 * ì ì ê´ê³ 매체(cafe_mkt) ë¹ì½ ë°ì¬ 3 * 4 * - ì ìíµê³ V3(weblog/eclog ë¹ì½) ì¢ ë£ ëì. ê´ê³ 매체 ê²°ì /ììì ìºìëë ì§ì íì´ì§ê° ìëë¼ 5 * uncached ë¹ì½(/exec/front/inflow/main, appInflowFrontExecMain)ìì ìííë¤. 6 * - 모ë ì¬ì©ì ê³µíµì "ì ì ë°ì¬ ì¤í¬ë¦½í¸"ë¼ ì§ì íì´ì§ê° HRPCS ìºìëì´ë ì¤ì¼ëì§ ìëë¤. 7 * ìë ê²ì´í¸ë ì ë¶ í´ë¼ì´ì¸í¸ ë°íì ê°(location/referrer/UA)ë§ ë³´ë¯ë¡ ì´ ì ì 를 ê¹¨ì§ ìëë¤. 8 * - ì ìíµê³ ìì§ê¸°(weblog.js)ì 무ê´í ë³ë ìì§ê¸°ë¤. 9 * 10 * @see https://jira.simplexi.com/browse/ECHOSTING-618344 (ëì ) 11 * @see https://jira.simplexi.com/browse/ECHOSTING-634694 (í¸ì¶ ìµìí ê²ì´í¸) 12 */ 13(function () { 14 try { 15 // ì¤ë³µ ë°ì¬ ê°ë â ì¤í¬ë¦½í¸ê° 2í ì´ì ë¡ëë¼ë 1íë§ ë°ì¬ 16 if (window.__ecInflowBeaconFired === true) { 17 return; 18 } 19 window.__ecInflowBeaconFired = true; 20 21 // top-frame íì â iframe ë´ë¶(ìì ¯/ìë² ë)ë ì ì ëë©ì´ ìëë¤ 22 if (window.self !== window.top) { 23 return; 24 } 25 26 /* 27 * 미리보기 ì ì¸ â ì¤í¨ í¸ì§ 미리보기ë ì¤ ì ì ì´ ìëë¤. 28 * 29 * PHP(setInflowBeaconJs)ê° ìëë¼ ì¬ê¸°ì íì íë¤. ì§ì íì´ì§ë HRPCS ìºì ëìì´ê³ 30 * ìµìí ë©ì¸ íì´ì§ë 쿼리ì¤í¸ë§ì´ ìºì í¤ìì ë¹ ì§ë¯ë¡(`/?cb=ëë¤` ë x-cache: HIT), 31 * PHP ìì 걸ë¬ë´ë©´ 미리보기 ìëµì´ ê³µì ìºì를 ì±ì ì¤ì¬ì©ì ì ìì´ ë¹ì½ ìë íì´ì§ë¥¼ 32 * ë°ê² ëë¤. JS ë ìºìëëë¼ë 매 ì¬ì©ì ë¸ë¼ì°ì ìì ì¤íëë¯ë¡ ê·¸ ì¤ì¼ì´ ìë¤. 33 * 34 * í¸ì§ê¸°ê° 미리보기 URL ê³¼ ê·¸ ìì ë§í¬ì PREVIEW_SDE=1 ì ì ííë¤ 35 * (app/Editor/Resource/js/View/Preview.js, appBoardUtilDataList.php). 36 * libRoute::isSkinPreview() ì HTTP_EC_URI_SKIN_CODE í¤ë ë¶ê¸°ë JS ê° ë³¼ ì ìì´ 37 * 커ë²íì§ ìëë¤ (기존 PHP ê²ì´í¸ë PREVIEW_SDE ë§ ë´¤ì¼ë¯ë¡ íí ëë¹ ìì¤ ìì). 38 */ 39 if (/[?&]PREVIEW_SDE=1/i.test(location.search) === true) { 40 return; 41 } 42 43 /* 44 * ë´ ì ì¸ â ê´ê³ 매체 attribution ì ë´ í¸ëí½ì 무ì미íë¤. 45 * 46 * ë´ì referer ìì´ URL ì ì§ì ì°ì¼ë¯ë¡ ìë ì í¸ ê²ì´í¸ì "ë´ë¶ íì " ì¡°ê±´ì ê±¸ë¦¬ì§ ìì 47 * 매 íì´ì§ ë°ì¬ëë¤. í¬ë¡¤ë¬ê° ìì² íì´ì§ë¥¼ ëë©´ ê·¸ëë¡ ìì² í¸ì¶ì´ë¼ ì¬ê¸°ì ëëë¤. 48 * 49 * [MUST] 목ë¡ì lib/Inflow/libInflowLoadblock.php ì $aBotUserAgent ì íì ëì¼íê² ì ì§íë¤. 50 * ììê¹ì§ ì본과 ë§ì¶° ì¤ ë¨ì ëì¡°ê° ëê² ëë¤. íìª½ë§ ê³ ì¹ë©´ íì ì´ ì´ê¸ëë¤. 51 * - ì¬ê¸°(JS) : í¸ì¶ ì체를 ë§ëë¤. JS 를 ì¤ííë ë´ìë§ ê±¸ë¦°ë¤. 52 * - ìë²(lib) : JS ì°í(ì§ì POST)를 ë§ëë¤. ìµì¢ ë°©ì´ì . 53 */ 54 var A_BOT = [ 55 'X-SIMPLEXI-' 56 , 'Daum(oa)?\\/4\\.1' 57 , 'Baiduspider-render' 58 , 'AdsBot-Naver' 59 , 'AdsBot-Google' 60 , 'pyspider' 61 , 'wkhtmltoimage' 62 , 'PhantomJS' 63 , 'YandexBot' 64 , 'KISA Privacy Incident Response System' 65 , 'HubSpot Webcrawler' 66 , 'AmazonProductDiscovery' 67 , 'AmazonSellerInitiatedListing' 68 , 'HeadlessChrome' 69 , 'BingPreview' 70 , 'Bytespider' 71 , 'Googlebot' 72 , 'NaverBot' 73 , 'NHN Corp' 74 , 'msnbot' 75 , 'WebAuto' 76 , 'http:\\/\\/help\\.naver\\.com\\/robots\\/' 77 , 'Yeti' 78 , 'Slurp' 79 , 'bingbot' 80 , 'facebookexternalhit' 81 , 'DotBot' 82 , 'PetalBot' 83 , 'Adsbot' 84 , 'MojeekBot' 85 , 'applebot' 86 ]; 87 var RE_BOT = new RegExp('(' + A_BOT.join('|') + ')', 'i'); 88 if (RE_BOT.test(navigator.userAgent) === true) { 89 return; 90 } 91 92 /** 93 * ëë© URL ì í¸ â ìë² libInflowResolver::resolve() ê° rloc ìì ë³´ë íë¼ë¯¸í° 94 * cafe_mkt(0ìì) / utm_*(1ìì+ê°ì 매í) / remind_id·push_code(3ìì)
95 * / k_media(kakao_sa ê°ì 매í) / sbpm(naver_ks ì¸ë¶í) 96 * ìë²ê° ì¤ì ë¡ ì±ííì§ ìë ì¡°í©(utm_source ìë utm_medium ë±)ë í¬í¨íë¤. 97 * ê³¼ë°ì¬ë ííê³¼ ê°ê³ 과차ë¨ë§ì´ íê·ì´ë¯ë¡, íì ì íì ë°ì¬ 쪽ì¼ë¡ 기ì´ë¤. 98 */ 99 var RE_LOC_SIGNAL = /[?&](cafe_mkt|utm_source|utm_medium|utm_campaign|utm_content|remind_id|push_code|k_media|sbpm)=/i; 100 101 /** cafe24plus ì±(2ìì). UA ì´ê¸°í ì¼ì´ì¤ì ì¿ í¤ í´ë°±ì HttpOnly ë¼ í´ë¼ê° 못 ì½ëë¤ â ìë 주ì ì°¸ê³ */ 102 var RE_UA_SIGNAL = /Cafe24Plus/i; 103 104 /** 105 * referer ê° ì기 ëë©ì¸ì¸ì§ (= ì¬ì´í¸ ë´ë¶ íì ) 106 * ë¹ referer(ì§ì ì§ì / referrer-policy ì°¨ë¨)ë ë´ë¶ë¡ ë¨ì íì§ ìëë¤ â ë°ì¬íë¤. 107 * 108 * @param {string} sRef document.referrer 109 * @return {boolean} ë´ë¶ íì ë©´ true 110 */ 111 function isInternalReferrer(sRef) { 112 if (!sRef) { 113 return false; 114 } 115 try { 116 var oAnchor = document.createElement('a'); 117 oAnchor.href = sRef; 118 return (oAnchor.hostname === location.hostname); 119 } catch (e) { 120 return false; 121 } 122 } 123 124 var sRloc = location.href; 125 var sRref = document.referrer; 126 127 /* 128 * ì í¸ ê²ì´í¸ â "ìë²ì 물ì´ë³¼ ì´ì ê° ìëê°" 를 íì íë¤. 129 * 130 * 미ë°ì¬ = (íì ì¬ë£ ìì) AND (ë´ë¶ íì ) 131 * = â â¡ ë ë¤ ìì + ⢠referer ê° ì기 ëë©ì¸ 132 * 133 * â ëë© URL ì í¸ â¡ cafe24plus ì± UA ⢠ë´ë¶ íì ì¬ë¶ 134 * 135 * weblog ê³¼ 목ì ì´ ë¬ë¼ì ê°ë¥í ìµì íë¤. 136 * weblog : íì´ì§ë·° ì§ê³ê° 목ì ì´ë¼ 매 íì´ì§ ë°ì¬ê° íìíë¤. 137 * inflow : ëë© 1í attribution ì´ ëª©ì ì´ë¼, ì í¸ ìë ë´ë¶ íì ë ìë²ê° 100% ë¹ìì´ë¤. 138 * 139 * [referer ì ì í¸ë ë³´ì§ ìëë¤] 140 * ìë²ë rref ììë ê°ì 매í(k_media / dcollection / youtube / chatgpt / claude / gemini)ì 141 * íì íì§ë§, ê·¸ ê²½ë¡ê° ì ì¼í 기íê° ëë ê±´ "ëë©ìì ë¹ì½ì 못 ìì ë" ë¿ì´ë¤. 142 * - ëë© íì´ì§ ë¯¸ì»¤ë² : setInflowBeaconJs ê° Front Hybrid í ì´ë¼ ì íë¡ í¸ íì´ì§ë¥¼ 커ë²íë¤. 143 * - ëë© ë¹ì½ ì¤í¨ : ì¤í¨í ì¬ì©ìë ëê° ì¦ì ì´íì´ë¼ 주문ê¹ì§ ê°ì§ ìì attribution ì´ ë¬´ì미íë¤. 144 * referer ê° ì¸ë¶ì¸ ê²½ì°ë â¢ ì´ ì´ë¯¸ ë°ì¬ìí¤ë¯ë¡, referer ì í¸ ê²ì¬ë ëë© ì§í 첫 í´ë¦ì 145 * ì¤ë³µ í¸ì¶íê² ë§ë¤ ë¿ì´ìë¤. (ECHOSTING-634694) 146 * 147 * cafe24plus ì±ì UA ì´ê¸°í ì¼ì´ì¤(ECHOSTING-437231 / 459719)ë ìë²ê° HttpOnly ì¿ í¤ 148 * (EC_MOBILE_PLUS_APP) ë¡ í´ë°± íì íë¯ë¡ í´ë¼ê° ë¨ë ì¼ë¡ íë¨í ì ìë¤. ë¤ë§ ì± ì²« ì§ì ì 149 * referer ê° ë¹ì´ ì¡°ê±´ ⢠ì¼ë¡ íì ë°ì¬ëê³ ê±°ê¸°ì ec_cafe_mkt ê° ì¬ì´ì§ë¯ë¡, ì´í ë´ë¶ íì ê° 150 * ì°¨ë¨ë¼ë attribution ìì¤ì´ ìë¤. 151 * fb_external_id, fb_event_id, siteLT ì¿ í¤ê° ìì¼ë©´ inflow ë¹ì½ì í¸ì¶í´ì¤ì¼ í¨. 152 */ 153 if (RE_LOC_SIGNAL.test(sRloc) === false 154 && RE_UA_SIGNAL.test(navigator.userAgent) === false 155 && isInternalReferrer(sRref) === true 156 && document.cookie.includes('fb_external_id') === true 157 && document.cookie.includes('fb_event_id') === true 158 ) { 159 return; 160 } 161 162 var sUrl = '/exec/front/inflow/main'; 163 var sBody = 'rloc=' + encodeURIComponent(sRloc) 164 + '&rref=' + encodeURIComponent(sRref); 165 166 // ì ìíµê³ iframe ì´ê´: ì¿ í¤ê° ìë ê²½ì°ìë§ sessionStorage ê°ì ë¹ì½ì ì¤ì´ ì ë¬íë¤. 167 // ì ì¡ ì¡°ê±´ì weblog.js ì ëì¼íê² "ì¿ í¤ ì°ì , ë¶ì¬ ì sessionStorage" ê·ì¹ì ë°ë¥¸ë¤. 168 // u íì±ì URLSearchParams 미ì§ì ë¸ë¼ì°ì 를 ê³ ë ¤í´ ë³ë try/catch ë¡ ê²©ë¦¬íë¤. 169 // íì±ì´ ì¤í¨í´ë external_id/event_id ìì§ì ê³ì ì§íëì´ì¼ íë¤. 170 // @see https://jira.simplexi.com/browse/ECHOSTING-632441 171 var sMid = ''; 172 var sShopNo = ''; 173 try { 174 if (document.currentScript && document.currentScript.src) { 175 var sSrc = document.currentScript.src; 176 var sUnit = ''; 177 if (typeof URLSearchParams === 'function') { 178 sUnit = new URLSearchParams(sSrc.split('?')[1]).get('u') || ''; 179 } else { 180 var aMatch = sSrc.match(/[?&]u=([^&]*)/); 181 sUnit = aMatch ? decodeURIComponent(aMatch[1]) : ''; 182 } 183 var aUnit = sUnit.split('.'); 184 sMid = aUnit[0] || ''; 185 sShopNo = aUnit[1] || ''; 186 } 187 } catch (eUnit) { 188 sMid = ''; 189 sShopNo = ''; 190 } 191 192 if (!document.cookie.includes('fb_external_id') && sessionStorage.getItem('fb_external_id')) {
193 sBody += '&ca_external_id=' + encodeURIComponent(sessionStorage.getItem('fb_external_id')); 194 } 195 if (!document.cookie.includes('fb_event_id') && sessionStorage.getItem('fb_event_id')) { 196 sBody += '&ca_event_id=' + encodeURIComponent(sessionStorage.getItem('fb_event_id')); 197 } 198 if (!document.cookie.includes('siteLT') && sMid !== '' && sShopNo !== '') { 199 var sSiteLt = sessionStorage.getItem('siteLT_' + sMid + '_' + sShopNo); 200 if (sSiteLt) { 201 // ca_shop_no ë ìë²ìì íì¬ ìì² ëª°ê³¼ì ì¼ì¹ë¥¼ ì¬ê²ì¦í기 ìí´ í¨ê» ë³´ë¸ë¤. 202 sBody += '&ca_sitelt=' + encodeURIComponent(sSiteLt) 203 + '&ca_shop_no=' + encodeURIComponent(sShopNo); 204 } 205 } 206 207 if (navigator.sendBeacon) { 208 navigator.sendBeacon(sUrl, new Blob([sBody], {type: 'application/x-www-form-urlencoded'})); 209 } else { 210 var oXhr = new XMLHttpRequest(); 211 oXhr.open('POST', sUrl, true); 212 oXhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 213 oXhr.send(sBody); 214 } 215 } catch (e) {} 216})();
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.