Skip to content

[feature] sns링크 버튼 클릭이벤트 추가#998

Merged
seongwon030 merged 1 commit intodevelop-fefrom
feature/#997-sns-link-data-log-MOA-474
Dec 30, 2025
Merged

[feature] sns링크 버튼 클릭이벤트 추가#998
seongwon030 merged 1 commit intodevelop-fefrom
feature/#997-sns-link-data-log-MOA-474

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Dec 30, 2025

#️⃣연관된 이슈

ex) #997

📝작업 내용

  • sns링크버튼 클릭이벤트 추가
  • platform, clubName 수집

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

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

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

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

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

🫡 참고사항

Summary by CodeRabbit

릴리스 노트

  • 개선사항
    • 클럽 프로필 페이지의 소셜 미디어 링크 상호작용이 더 정확하게 감지됩니다
    • 사용자 인터페이스 레이아웃이 최적화되었습니다

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

@seongwon030 seongwon030 requested a review from oesnuj December 30, 2025 05:48
@seongwon030 seongwon030 self-assigned this Dec 30, 2025
@seongwon030 seongwon030 added ✨ Feature 기능 개발 💻 FE Frontend labels 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:48am

@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 컴포넌트에 Mixpanel 분석 추적을 통합하여 SNS 링크 클릭 이벤트를 수집합니다. 각 소셜 링크에 onClick 핸들러를 추가하여 플랫폼과 클럽명과 함께 SNS_LINK_CLICKED 이벤트를 발행합니다.

Changes

Cohort / File(s) 변경 내용
SNS 링크 클릭 이벤트 추적
frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx
useMixpanelTrack 및 USER_EVENT 임포트 추가; trackEvent 훅 초기화; 각 SNS 링크에 onClick 핸들러 추가하여 platform 및 clubName 정보와 함께 SNS_LINK_CLICKED 이벤트 발행; 인라인 주석 제거 및 마이너 포맷팅 조정

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • Moadong/moadong#994: SNS 링크 클릭 이벤트 추적 구현으로 직접 관련됨
  • [feature] MOA-474 SNS링크 클릭이벤트 수집 #997: ClubProfileCard의 소셜 링크에 대한 SNS 링크 클릭 이벤트 수집 구현
  • Moadong/moadong#993: 프론트엔드에서 SNS 링크 클릭 이벤트 추적 구현

Possibly related PRs

Suggested reviewers

  • oesnuj
  • Zepelown
  • lepitaaar
  • PororoAndFriends

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.
Linked Issues check ✅ Passed 코드 변경사항이 MOA-474 이슈의 요구사항(SNS 링크 클릭 이벤트 수집)을 충족하여 platform 및 clubName 데이터를 기록합니다.
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.
Title check ✅ Passed PR 제목이 변경사항의 핵심 내용을 정확하게 반영하고 있습니다. SNS 링크 버튼 클릭 이벤트 추가라는 주요 변경사항을 명확하고 간결하게 설명하고 있습니다.
✨ Finishing touches
  • 📝 Generate docstrings

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.

@seongwon030 seongwon030 changed the title feat: sns링크 버튼 클릭이벤트 추가 [feature] sns링크 버튼 클릭이벤트 추가 Dec 30, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/src/pages/ClubDetailPage/components/ClubProfileCard/ClubProfileCard.tsx (1)

8-9: useMixpanelTrack 훅 구현 검증 완료.

useMixpanelTrack 훅이 올바르게 구현되어 있으며, 자동으로 distinct_id, timestamp, url을 추적 데이터에 추가합니다. ClubProfileCard 컴포넌트의 구현(lines 96-101)도 코드베이스 전체의 일관된 패턴을 따르고 있습니다.

에러 처리는 현재 코드베이스의 다른 모든 추적 구현에서도 없으므로, 전체 분석 시스템에 대한 개선 사항으로 고려할 수 있습니다(선택사항).

📜 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 fbf13b3 and ca9a429.

📒 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 (1)
📚 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)

30-30: LGTM!

훅 초기화가 올바르게 구현되었습니다.


96-101: 이벤트 추적 구현이 올바릅니다.

SNS 링크 클릭 시 platform과 clubName을 수집하는 로직이 정확하게 구현되었습니다. target='_blank'로 새 탭에서 열리므로 이벤트 전송이 완료될 시간이 충분합니다.

다만, trackEvent 내부에서 에러 처리가 되는지 확인해주세요. 외부 분석 서비스 호출 실패가 사용자 경험에 영향을 주지 않도록 해야 합니다.


116-116: LGTM!

포매팅 변경으로 기능적 영향은 없습니다.

Copy link
Collaborator

@suhyun113 suhyun113 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 c75b487 into develop-fe Dec 30, 2025
3 checks passed
@seongwon030 seongwon030 deleted the feature/#997-sns-link-data-log-MOA-474 branch December 30, 2025 12:28
@seongwon030 seongwon030 linked an issue Dec 30, 2025 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend ✨ Feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] MOA-474 SNS링크 클릭이벤트 수집

2 participants

Comments