Skip to content

Fix: 웹 GA 식별자를 서버 분석 ID로 통일 (#609) - #610

Merged
goder-0 merged 1 commit into
mainfrom
feature/609-ga-identifiers
Oct 18, 2026
Merged

goder-0 merged 1 commit into
mainfrom
feature/609-ga-identifiers

Conversation

@goder-0

@goder-0 goder-0 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

문제와 변경

웹은 화면용 Hashids를, 서버는 DB ID를 GA에 보내 동일 사용자와 링크가 분리됐습니다. 회원·링크 응답의 analyticsId를 user_id와 link_id에 사용합니다. 목록·상세·채팅 이력·실시간 답변에서 분석 ID를 보존하고 재요약·삭제·질의 결과 클릭에 전달합니다.

검증 및 적용

  • 단위 테스트 36개, Chromium 회귀 테스트 15개, 포맷·린트·타입 검사·프로덕션 빌드 통과
  • 분석 ID가 없거나 잘못된 구버전 응답에는 Hashids를 대체 전송하지 않고 ID만 생략합니다. 화면 경로·API 요청 ID는 유지합니다.
  • 백엔드 fix: GA 분석용 회원 및 링크 식별자 제공 (#335) linkiving-core#336 선배포 필요. CHANGELOG·README에 계약과 배포 순서 반영
  • 로컬 검증은 모의 API를 사용했으며 운영 배포와 실제 GA 수신 검증을 대체하지 않습니다.

Closes #609

@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0e718093-2da9-485e-8fa3-d1d0da6b29b0
📥 Commits

Reviewing files that changed from the base of the PR and between c75bce4 and 7c543e6.

📒 Files selected for processing: 16
  • CHANGELOG.md
  • README.md
  • src/apis/chatSocket.ts
  • src/apis/linkApi.ts
  • src/app/(route)/all-link/AllLink.tsx
  • src/app/(route)/chat/[id]/ChatPage.tsx
  • src/components/AnalyticsIdentity.tsx
  • src/components/basics/LinkCard/components/DeleteLinkModal.tsx
  • src/components/wrappers/LinkCardDetailPanel/LinkCardDetailPanel.tsx
  • src/components/wrappers/ReSummaryModal/ReSummaryModal.tsx
  • src/lib/client/analytics.test.ts
  • src/lib/client/analytics.ts
  • src/types/api/chatApi.ts
  • src/types/api/linkApi.ts
  • src/types/link.ts
  • src/types/user.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

사용자 및 링크 분석 식별자로 analyticsId를 추가하고, GA 사용자 ID와 재요약·삭제·질의 결과 클릭 이벤트에 사용합니다. 유효한 양의 십진 정수 문자열만 GA 식별자로 기록합니다. 문서에는 화면용 id와 분석용 analyticsId의 용도를 구분하고, 분석 ID를 반환하는 백엔드 변경을 먼저 배포해야 한다고 명시합니다.

Priority: ⬇️ Low

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 7c543

No actionable issue identified here prevents merging. Deploy the backend analytics-ID response first, as documented.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed 제목은 웹 GA 식별자를 서버 분석 ID로 통일하는 주요 변경 사항을 명확하게 설명합니다.
Description check Passed PR 설명은 변경 목적, 적용 범위, 검증 결과, 백엔드 선배포 조건, 구버전 응답 처리와 이슈 연결을 포함합니다. 템플릿의 제목인 "## 관련 이슈"와 "## PR 설명"을 그대로 사용하지 않았지만, 필요한 정보는 대부분 제공됩니다.
Linked Issues check Passed 직접 연결된 #609의 요구를 충족합니다. analytics.ts는 양의 10진 문자열만 user_id와 link_id로 전송하고, 구버전·누락·잘못된 값에는 Hashids 대체값을 전송하지 않습니다. 요약 재생성·삭제·질의 결과 클릭에 trackLinkEvent를 적용했습니다. 회원·링크·채팅 데이터의 analyticsId 전달과 화면 …
Out of Scope Changes check Passed 제공된 PR 변경 요약과 확인한 파일에서 변경은 #609의 GA 식별자 계약, 데이터 전달, 회귀 테스트, 문서화에 직접 연결됩니다. 이 범위를 벗어난 관련 없는 구현 변경은 확인되지 않았습니다.
Full details: Linked Issues check

Explanation

직접 연결된 #609의 요구를 충족합니다. analytics.ts는 양의 10진 문자열만 user_id와 link_id로 전송하고, 구버전·누락·잘못된 값에는 Hashids 대체값을 전송하지 않습니다. 요약 재생성·삭제·질의 결과 클릭에 trackLinkEvent를 적용했습니다. 회원·링크·채팅 데이터의 analyticsId 전달과 화면 ID 및 API 요청 ID 보존을 구현했습니다. 회귀 테스트는 큰 숫자 보존, 잘못된 ID 생략, 로그아웃 해제를 검증합니다. CHANGELOG.md에 계약과 백엔드 선배포 순서를 기록했습니다.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@goder-0
goder-0 merged commit 4032cac into main Oct 18, 2026
3 checks passed
This was referenced Oct 19, 2026

This branch was successfully deployed

1 active deployment
Preview — 7c543e61 Deployed Oct 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

웹 GA 이벤트에 서버와 동일한 분석용 회원·링크 ID 사용

1 participant