Repository navigation
feat: Mixpanel 이벤트 퍼널 이탈율 조회 - #507
Merged
Merged
Conversation
PM이 MVP 이탈 지점을 보려면 단계별 전환이 필요한데 서버에 퍼널 계산이 없었다. 집계 API 의 퍼널 리포트는 플랜 제한으로 막혀 있어 원본 이벤트로 직접 계산한다. 고유 사용자 기준이고, 다음 단계는 앞 단계 이후여야 하며 첫 단계로부터 windowDays 안에 끝나야 한다. Mixpanel 화면의 Unique Conversion 과 같은 규칙이다. 2026-08 실데이터로 battle_step 에서 community_action 까지 24 / 24 / 2 (8.33%) 가 콘솔 퍼널 화면 숫자와 일치함을 확인했다. 단계는 event:property=value 로 속성까지 좁힐 수 있다. 배틀 흐름은 선택·재생·투표가 모두 battle_step 한 이벤트로 들어오고 step_name 으로만 갈려서, 속성을 못 좁히면 이 구간이 한 단계로 뭉쳐 이탈율을 볼 수 없다. 분모가 0이면 전환율을 0% 가 아니라 null 로 둔다. 아무도 진입하지 않은 것과 전환 실패를 구분한다.
Roy-wonji
added a commit
that referenced
this pull request
Sep 28, 2026
# Conflicts: # docs/api-specs/admin-analytics-api.md # src/main/java/com/swyp/picke/domain/admin/analytics/AdminAnalyticsController.java # src/main/java/com/swyp/picke/domain/admin/analytics/MixpanelClient.java
Roy-wonji
added a commit
that referenced
this pull request
Sep 28, 2026
dev → main 배포. 원 PR: #507 ## 내용 `GET /api/v1/admin/analytics/mixpanel/funnel` 추가. PM이 MVP 이탈 지점(배틀 선택 → 재생 → 사후 투표 → 댓글 참여)을 단계별 전환으로 본다. - 고유 사용자 기준, 다음 단계는 앞 단계 이후 + 첫 단계로부터 `windowDays` 안. - 단계에 `event:property=value` 필터 지원. 배틀 흐름이 `battle_step` 한 이벤트에 `step_name`으로만 갈려 있어 필요하다. - 전환율 분모가 0이면 `null`. 미진입과 전환 실패를 구분한다. ## 검증 - 분석 도메인 테스트 전체 통과. - 실제 Mixpanel 데이터로 콘솔 퍼널 화면 숫자(24 / 24 / 2, 8.33%)와 일치 확인. - 새 환경변수 없음. 기존 `MIXPANEL_API_SECRET` 사용. --------- Co-authored-by: 준혁 <127603139+HYH0804@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Youwol <153346797+si-zero@users.noreply.github.com> Co-authored-by: 현준혁 <guswnsgur2276@metabuild.co.kr> Co-authored-by: HYH0804 <guswnsgur2276@gmail.com> Co-authored-by: JOO <107450745+jucheonsu@users.noreply.github.com> Co-authored-by: 서원지 <shuwj81@daum.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
PM이 MVP 이탈 지점(배틀 선택 → 재생 → 사후 투표 → 댓글 참여)을 보려면 단계별 전환이 필요한데 서버에 퍼널 계산이 없었다. Mixpanel 집계 API의 퍼널 리포트는 현재 플랜이 막고 있어(
HTTP 402) 원본 이벤트로 직접 계산한다.변경
GET /api/v1/admin/analytics/mixpanel/funnel?from&to&steps=A,B,C&windowDays=7(ADMIN 전용)windowDays안에 끝나야 한다. Mixpanel 화면의 Unique Conversion·전환 윈도우와 같은 규칙이다.event:property=value로 속성까지 좁힐 수 있다. 배틀 흐름은 선택·재생·투표가 모두battle_step한 이벤트로 들어오고step_name으로만 갈려서, 속성을 못 좁히면 이 구간이 한 단계로 뭉쳐 이탈율을 볼 수 없다.8개,30, 기간 31일까지(원본을 받으므로).windowDays1null로 둔다. 아무도 진입하지 않은 것과 전환 실패를 구분한다.검증
./gradlew test --tests "com.swyp.picke.domain.admin.analytics.*"BUILD SUCCESSFULbattle_step → screen_view → community_action7일 윈도우로 실제 API 호출 결과 24 / 24 / 2 (8.33%) — Mixpanel 콘솔 퍼널 화면 숫자와 일치한다.step_name분리): 24 → 14 → 11 → 1. 사후 투표에서 댓글 참여로 넘어갈 때 90.9%가 이탈한다.배포 메모
MIXPANEL_API_SECRET을 그대로 쓴다.