From 1052cc3348e29a99ccd7abb30012b3ebf73d029a Mon Sep 17 00:00:00 2001 From: TtiPo Date: Tue, 6 Oct 2026 01:57:54 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=8B=A0=EC=B2=AD=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=EC=97=90=EC=84=9C=20=EC=8B=A0=EC=B2=AD=20=EC=A7=81?= =?UTF-8?q?=EC=A0=84(=EC=B5=9C=EC=A2=85)=20=EC=9C=A0=EC=9E=85=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 운영에 필요한 것은 업체 링크로 들어와 누가 신청·구매했는지이고, 신청 직전 유입은 쓰지 않는다. 기준이 둘(직전·최초)이라 화면만 복잡해져 신청 때 유입은 한 가지만 보여준다. - 신청 유입 집계 기준: 신청 직전 · 신청 때 최초 · 가입 경로 → 신청 때 유입 · 가입 경로 - 신청자 표·상세 패널: 신청 때 유입을 한 줄로 (최초/직전 구분 제거) - 개요의 신청 유입 상위도 신청 때 유입 기준 - 회원 상세의 가입 경로에서 '최종 유입' 줄 제거 백엔드는 그대로 둔다 (최종 유입은 저장만 하고 화면에 쓰지 않는다) Co-Authored-By: Claude Opus 5.5 --- imweb/imweb-members.html | 45 ++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/imweb/imweb-members.html b/imweb/imweb-members.html index 5da986b..2f87e70 100644 --- a/imweb/imweb-members.html +++ b/imweb/imweb-members.html @@ -477,7 +477,7 @@

신청 유입 상위

- 최근 30일 · 신청 직전 유입 기준 + 최근 30일 · 신청 때 유입 기준
@@ -571,8 +571,7 @@
- - +
@@ -593,7 +592,7 @@ 신청일시신청자연락처상품업체카톡 버튼 - 신청 때 유입가입 경로 + 신청 때 유입가입 경로 @@ -900,7 +899,7 @@ app: { range: 'all', mode: 'product', group: null, groupLabel: '', cursor: null, loading: false, seq: 0, groupsSeq: 0, - basis: 'apply_last', statsGroup: 'source', statsSeq: 0, inflowFilter: null, + basis: 'apply_first', statsGroup: 'source', statsSeq: 0, inflowFilter: null, rows: {} }, // 업체 링크 @@ -1445,7 +1444,6 @@ ['외부 리퍼러', esc(inf.referrer)], ['첫 랜딩', esc(inf.landingPath) + (inf.productId ? ' #' + esc(inf.productId) + '' : '')], ['최초 유입일', esc(inf.firstTouchDate)], - ['최종 유입', esc(inf.lastTouch)], ['기록일', esc(inf.recordedDate)] ]) + '
'; } @@ -1480,7 +1478,7 @@ setKpi('join-week', num(c.atJoin + c.afterJoin + c.none)); }).catch(errorNotice); - api('GET', '/admin/applications/inflow-stats' + toQuery(Object.assign({ basis: 'apply_last', groupBy: 'source' }, periodQuery('30', 'appliedFrom', 'appliedTo')))).then(function (s) { + api('GET', '/admin/applications/inflow-stats' + toQuery(Object.assign({ basis: 'apply_first', groupBy: 'source' }, periodQuery('30', 'appliedFrom', 'appliedTo')))).then(function (s) { $('[data-role="ov-app-bars"]').innerHTML = barsHtml(s.items.slice(0, TOP_SIZE), true, null, '건'); }).catch(errorNotice); @@ -1501,12 +1499,12 @@ $('[data-role="ov-recent-rows"]').innerHTML = page.items.length ? page.items.map(function (a) { state.app.rows[a.id] = a; var m = a.member; - var last = a.lastInflow && a.lastInflow.source ? a.lastInflow : a.inflow; + var inf = a.inflow; return '' + '' + whenCell(a.appliedAt) + '' + '' + personCell(m ? m.name : a.memberUid, '') + '' + '' + dash(a.productName) + '' + - '' + (a.partner ? '' + esc(a.partner.name) + '' : (last && last.source ? esc(last.source) : '-')) + '' + + '' + (a.partner ? '' + esc(a.partner.name) + '' : (inf && inf.source ? esc(inf.source) : '-')) + '' + ''; }).join('') : '아직 신청이 없습니다.'; }).catch(errorNotice); @@ -1519,7 +1517,7 @@ $('[data-role="ov-app-bars"]').addEventListener('click', function (e) { var bar = closest(e.target, '.mgm-bar'); if (!bar || bar.disabled) return; - openApplications({ range: '30', inflowFilter: { basis: 'apply_last', field: 'source', value: bar.getAttribute('data-key') } }); + openApplications({ range: '30', inflowFilter: { basis: 'apply_first', field: 'source', value: bar.getAttribute('data-key') } }); }); $('[data-role="ov-join-bars"]').addEventListener('click', function (e) { var bar = closest(e.target, '.mgm-bar'); @@ -1537,7 +1535,7 @@ /* ===================== 신청 내역 ===================== */ var appForm = $('[data-role="app-filter"]'); - var APP_BASIS_LABEL = { apply_last: '신청 직전', apply_first: '신청 때 최초', join: '가입 경로' }; + var APP_BASIS_LABEL = { apply_first: '신청 때 유입', join: '가입 경로' }; var APP_GROUP_LABEL = { source: '유입원', medium: '매체', campaign: '캠페인', content: '콘텐츠' }; // 다른 화면에서 신청 내역 열기 — 기간·유입 필터를 미리 채운다 @@ -1631,18 +1629,6 @@ $('[data-role="app-chips"]').innerHTML = chips.join(''); } - // 신청 때 유입 칸 — 최종 유입을 보여주고, 첫 경로가 다르면 '최초'로 함께 적는다 - function applyInflowCell(a) { - var first = a.inflow, last = a.lastInflow && a.lastInflow.source ? a.lastInflow : first; - var html = inflowText(last); - if (first && first.source && last && last.source && - (first.source !== last.source || first.medium !== last.medium || first.campaign !== last.campaign)) { - html += '최초: ' + - esc(first.source) + (first.medium ? ' / ' + esc(first.medium) : '') + ''; - } - return html; - } - function appRowHtml(a) { var m = a.member; state.app.rows[a.id] = a; @@ -1655,7 +1641,7 @@ '' + (a.kakaoClickedAt ? '클릭' : '-') + '' + - '' + applyInflowCell(a) + '' + + '' + inflowText(a.inflow) + '' + '' + joinInflowCell(m) + '' + ''; } @@ -1698,8 +1684,7 @@ function openApplicationDrawer(id) { var a = state.app.rows[id]; if (!a) return; - var first = a.inflow, last = a.lastInflow && a.lastInflow.source ? a.lastInflow : first; - var sameTouch = !first || !first.source || (first.source === last.source && first.medium === last.medium && first.campaign === last.campaign); + var inf = a.inflow || {}; var html = '

신청

' + dlHtml([ ['상품', dash(a.productName) + ' #' + esc(a.productIdx) + ''], ['신청일시', esc(kstDateTime(a.appliedAt))], @@ -1707,10 +1692,10 @@ ['카톡 버튼', a.kakaoClickedAt ? '눌렀음 · ' + esc(kstDateTime(a.kakaoClickedAt)) + ' (실제 입장 여부는 알 수 없음)' : '누르지 않음'] ]) + '
' + '

신청 때 유입

' + dlHtml([ - ['신청 직전', last && last.source ? esc(last.source) + (last.medium ? ' / ' + esc(last.medium) : '') : ''], - ['캠페인', esc(last && last.campaign)], - ['콘텐츠', esc(last && last.content)], - ['최초 유입', sameTouch ? '신청 직전과 같음' : esc(first.source) + (first.medium ? ' / ' + esc(first.medium) : '') + (first.campaign ? ' · ' + esc(first.campaign) : '')] + ['유입원', esc(inf.source)], + ['매체', esc(inf.medium)], + ['캠페인', esc(inf.campaign)], + ['콘텐츠', esc(inf.content)] ]) + '
' + memberSectionsHtml(a.member); openDrawer((a.member ? a.member.name : a.memberUid) + ' 님의 신청', html); }