Conversation
🔧 Electron Build Results✅ macOS
✅ Windows
This is an automated comment. |
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.
요약
Main 프로세스의 GA4 Measurement Protocol전송 구조로 리팩토링했습니다.contextBridge+ipcRenderer.invoke).page_view/URL 기반 추적을 제거하고 이벤트 기반 수집만 유지했습니다.client_id영속 저장 (getOrCreateClientId)app_version,platform,release_channel,screen,session_id)debug/mp/collect) + DebugView 노출 대응(debug_mode,engagement_time_msec)ERR_FAILED) 대응으로 URL 재시도 로직을 추가했습니다.변경 배경
api_secret은 절대 renderer 번들에 포함되면 안 됩니다.주요 변경사항
1) 분석 아키텍처 리팩토링
src/main/src/analytics.ts추가analytics:logEvent,analytics:setUserIdmp/collect, 옵션으로debug/mp/collect)client_id영속 저장:app.getPath('userData')/analytics.jsonsrc/main/src/index.ts에서 analytics 핸들러 등록.env로드 (dotenv)2) Preload 브리지 추가
src/preload/src/index.tselectronAPI.analytics.logEvent(...)electronAPI.analytics.setUserId(...)3) Renderer 분석 호출 정리
src/renderer/src/shared/lib/analytics/schema.ts추가src/renderer/src/shared/lib/analytics/client.ts추가src/renderer/src/shared/lib/analytics/events.ts를logEvent기반으로 변경src/renderer/src/shared/lib/analytics/index.tsexport 정리src/renderer/src/shared/lib/analytics/ga4.ts삭제src/renderer/src/app/providers/App.tsx에서 GA init/page_view 제거src/renderer/src/entities/user/api/use-login-mutation.ts에서 userId 설정 경로 변경src/renderer/src/shared/types/vite-env.d.ts정리4) 위젯 dev 로딩 안정화
src/main/src/widgetWindow.tsnew URL('widget', VITE_DEV_SERVER_URL)5) 문서/환경변수 정리
README.mdGA 섹션을 새 MP 구조 기준으로 갱신ga.md에 런타임 원칙 추가src/renderer/.env에서 GA 관련 키 제거이벤트 스키마
download_click{ platform: 'mac' | 'windows'; source: string }sign_up_complete{ user_id?: string }onboarding_enter{ step: string }measure_page_enter{ session_id: string }first_measure_start{ seconds_from_signup: number }measure_start{ session_id: string }measure_end{ session_id: string; duration_sec: number }bad_posture_enter{ session_id: string; posture_level: number }posture_recovered{ session_id: string; posture_level: number; recovery_time_sec: number }widget_toggle{ enabled: boolean }widget_visibility_end{ duration_sec: number; session_id?: string }notification_toggle{ enabled: boolean }meaningful_use{ type: string }검증 결과
pnpm run typecheck통과 (main/preload/renderer)debug/mp/collect response: { "validationMessages": [] }확인analytics.json생성 및clientId영속 확인debug_mode+engagement_time_msec반영 후)커밋 구성
feat(analytics): route renderer events to main via GA4 MPfix(widget): retry dev widget URL before fallbackdocs(analytics): update MP pipeline and debug setup릴리즈 메모
0.1.4(patch)main머지 후 해당 커밋에v0.1.4태그를 달아 진행하는 것을 권장합니다.