Skip to content

Comments

[hotfix] SNS 링크 버튼 클릭이벤트를 수집한다#995

Merged
seongwon030 merged 1 commit intomainfrom
feature/#994-sns-link-btn-data-log-MOA-473
Dec 30, 2025
Merged

[hotfix] SNS 링크 버튼 클릭이벤트를 수집한다#995
seongwon030 merged 1 commit intomainfrom
feature/#994-sns-link-btn-data-log-MOA-473

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Dec 30, 2025

#️⃣연관된 이슈

ex) #994

📝작업 내용

  • 유실되었던 sns링크 버튼 클릭 이벤트를 추가했습니다
  • platform, clubName 을 커스텀 prop으로 전달

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

신기능

  • 소셜 미디어 링크 클릭에 대한 사용자 상호작용 추적 기능 추가

✏️ Tip: You can customize this high-level summary in your review settings.

@seongwon030 seongwon030 self-assigned this Dec 30, 2025
@vercel
Copy link

vercel bot commented Dec 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
moadong Ready Ready Preview, Comment Dec 30, 2025 5:37am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 30, 2025

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

ClubProfileCard 컴포넌트에 SNS 링크 클릭 이벤트 추적 기능을 추가했습니다. Mixpanel을 통해 SNS 링크 클릭 시 플랫폼, URL, 클럽명을 포함한 분석 데이터를 수집하며, 기존 렌더링 구조와 네비게이션 로직은 유지됩니다.

Changes

코호트 / 파일(s) 변경 사항 요약
분석 추적 기능 추가
frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx
Mixpanel 분석 추적 초기화(useMixpanelTrack 훅 사용), SNS 링크 아이템에 onClick 핸들러 추가하여 SNS_LINK_CLICKED 이벤트 발생(platform, url, clubName 데이터 포함), 기존 렌더링 구조 유지

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • Moadong/moadong#994: SNS 링크 클릭 이벤트 추적을 통해 클릭 이벤트 수집 기능 구현
  • Moadong/moadong#993: SNS 링크/버튼 클릭에 대한 분석 데이터 수집 기능 구현

Possibly related PRs

Suggested labels

🛠Fix, 💻 FE

Suggested reviewers

  • oesnuj
  • lepitaaar
  • Zepelown

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용을 명확하게 반영하고 있으며, SNS 링크 버튼 클릭 이벤트 수집이라는 핵심 변경 사항을 정확하게 설명하고 있습니다.
Linked Issues check ✅ Passed PR에서 구현된 SNS 링크 클릭 이벤트 추적 기능(Mixpanel 이벤트 발행, platform과 clubName 전달)이 MOA-473 이슈의 목적인 'SNS 링크 버튼 클릭 이벤트 수집'을 충족하고 있습니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 SNS 링크 버튼 클릭 이벤트 수집이라는 범위 내에 있으며, 기존 네비게이션이나 데이터 흐름을 변경하지 않고 분석 추적만 추가되었습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between dc739bf and b064c4c.

📒 Files selected for processing (1)
  • frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx
🧰 Additional context used
📓 Path-based instructions (3)
frontend/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (frontend/.cursorrules)

frontend/**/*.{ts,tsx,js,jsx}: Replace magic numbers with named constants for clarity
Replace complex/nested ternaries with if/else or IIFEs for readability
Assign complex boolean conditions to named variables for explicit meaning
Avoid hidden side effects; functions should only perform actions implied by their signature (Single Responsibility Principle)
Use unique and descriptive names for custom wrappers/functions to avoid ambiguity
Define constants near related logic or ensure names link them clearly to avoid silent failures
Break down broad state management into smaller, focused hooks/contexts to reduce coupling

Files:

  • frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx
frontend/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (frontend/.cursorrules)

frontend/**/*.{tsx,jsx}: Abstract complex logic/interactions into dedicated components/HOCs
Separate significantly different conditional UI/logic into distinct components
Colocate simple, localized logic or use inline definitions to reduce context switching
Choose field-level or form-level cohesion based on form requirements when using form libraries like react-hook-form
Use Component Composition instead of Props Drilling to reduce coupling

Files:

  • frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx
frontend/**/*.{ts,tsx}

📄 CodeRabbit inference engine (frontend/.cursorrules)

Use consistent return types for similar functions/hooks

Files:

  • frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx
🧠 Learnings (2)
📓 Common learnings
Learnt from: seongwon030
Repo: Moadong/moadong PR: 195
File: frontend/src/pages/AdminPage/AdminPage.tsx:7-7
Timestamp: 2025-03-19T05:18:07.818Z
Learning: AdminPage.tsx에서 현재 하드코딩된 클럽 ID('67d2e3b9b15c136c6acbf20b')는 로그인 기능 구현 후 동적으로 가져오는 방식으로 수정될 예정입니다.
📚 Learning: 2025-03-19T05:18:07.818Z
Learnt from: seongwon030
Repo: Moadong/moadong PR: 195
File: frontend/src/pages/AdminPage/AdminPage.tsx:7-7
Timestamp: 2025-03-19T05:18:07.818Z
Learning: AdminPage.tsx에서 현재 하드코딩된 클럽 ID('67d2e3b9b15c136c6acbf20b')는 로그인 기능 구현 후 동적으로 가져오는 방식으로 수정될 예정입니다.

Applied to files:

  • frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx
🧬 Code graph analysis (1)
frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx (1)
frontend/src/constants/eventName.ts (1)
  • USER_EVENT (1-38)
🔇 Additional comments (3)
frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx (3)

8-9: LGTM! 필요한 import가 올바르게 추가되었습니다.

SNS 링크 클릭 이벤트 추적을 위한 상수와 훅을 정확하게 import했습니다. USER_EVENT.SNS_LINK_CLICKED는 이벤트 이름 상수 파일에서 올바르게 정의되어 있음을 확인했습니다.


30-30: LGTM! 훅 초기화가 올바릅니다.

useMixpanelTrack 훅을 컴포넌트 최상단에서 올바르게 초기화했습니다. 훅 호출 규칙을 준수하고 있습니다.


97-103: LGTM! SNS 링크 클릭 이벤트 추적이 올바르게 구현되었습니다.

SNS 링크 클릭 시 플랫폼, URL, 클럽명을 포함한 이벤트 데이터를 Mixpanel로 전송하는 로직이 정확하게 구현되었습니다. onClick 핸들러가 기본 네비게이션 동작을 방해하지 않으므로 사용자 경험에 영향을 주지 않습니다.

다만, 수집되는 데이터(특히 urlclubName)에 개인정보나 민감한 정보가 포함되어 있지 않은지 확인해주세요. 일반적으로 공개된 SNS 링크와 클럽명은 문제가 없지만, 개인정보 보호 정책 관점에서 한 번 더 검토하는 것이 좋습니다.


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 and usage tips.

Copy link
Member

@oesnuj oesnuj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

놓친 sns 이벤트 수집 추가해주신거 좋습니다

@seongwon030 seongwon030 merged commit 274c512 into main Dec 30, 2025
3 checks passed
@lepitaaar lepitaaar deleted the feature/#994-sns-link-btn-data-log-MOA-473 branch February 21, 2026 07:55
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.

2 participants