feat: posthog 수정 - #43
Merged
Merged
Conversation
- UT 히트맵·세션 리플레이 수집이 목적이다. 웹 SDK 하나만 넣는다 — 앱은 WebView 셸이라 사용자가 보는 화면이 전부 웹에 있다. 네이티브 SDK 를 같이 넣으면 같은 화면을 이중으로 녹화하는 데다 네이티브 모듈이 6개 늘어 EAS 재빌드가 필요해진다. - 사용자 식별(identify)은 하지 않는다. UT 토큰이 빌드에 박혀 있어 모든 테스트폰의 JWT sub 가 같고, identify 하면 PostHog 가 테스터 전원을 한 명으로 합쳐버린다. 기기 구분은 nook_platform(ios/android/web) super property 로만 남긴다. - posthog-js 는 초기 청크를 78kB(gzip) 키운다. 웹뷰 앱의 첫 로딩을 분석이 늦출 이유가 없어 지연 로딩해 별도 청크로 분리했다. 메인 청크 gzip 173.17 → 173.42kB. - 초기화 실패는 전부 삼킨다. 분석 때문에 앱 동작이 멈추는 경로를 만들지 않는다. - 로컬(pnpm dev)에서는 수집하지 않는다. 값은 Vercel 환경변수로 주입하며, Vite 가 빌드 타임에 인라인하므로 변수를 바꾸면 재배포가 필요하다. - 세션 리플레이 입력 마스킹(maskAllInputs)과 히트맵(capture_heatmaps)은 PostHog 프로젝트 설정 토글에 맡기지 않고 코드에서 명시했다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- 그룹 생성·수정·삭제, 메모 저장, 장소 북마크 토글, 장소 직접 추가를 찍는다. 히트맵·리플레이만으로는 "어디를 눌렀나"는 보여도 "성공했나"가 안 보여서, 전부 mutation 의 onSuccess 에만 건다. 실패한 시도는 이벤트로 남지 않는다. - identify 는 여전히 하지 않는다. distinct id 없이 super property(nook_platform)와 세션 단위로만 본다. - SDK 가 지연 로딩되는 동안 발생한 이벤트는 큐에 모았다가 init 직후 흘려보낸다. 첫 화면에서 바로 액션하는 테스터의 이벤트를 통째로 잃지 않기 위해서다. - place_directly_added 는 아직 서버에 저장되지 않는 로컬 전용 장소에서 발화한다. "추가 시도" 지표로만 읽어야 한다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
# Conflicts: # apps/web/src/lib/posthog.ts
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.
No description provided.