Skip to content

[#405] PostHog 누락 이벤트 추가 및 신규 이벤트 추적 적용#406

Open
Hrepay wants to merge 8 commits intodevelopfrom
fix/#405
Open

[#405] PostHog 누락 이벤트 추가 및 신규 이벤트 추적 적용#406
Hrepay wants to merge 8 commits intodevelopfrom
fix/#405

Conversation

@Hrepay
Copy link
Member

@Hrepay Hrepay commented Mar 18, 2026

#️⃣ 관련 이슈

Resolved #405

💡작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

PostHog 도입 이후 정의만 되어 있고 실제로 호출되지 않던 이벤트들을 연결하고, 추적되지 않던 주요 사용자 인터랙션에 대한 신규 이벤트를 추가했습니다.

누락된 이벤트 호출 연결

  • click_partner_restaurant: 제휴점 마커 클릭 시 호출 추가 (partner_restaurant_id, college, major 파라미터 포함)
    • partnershipInfos가 비어있어도 이벤트가 전송되도록 nil 분기 제거
  • write_review_v2: 리뷰 작성 버튼 탭 시 호출 추가
  • complete_review_v2: 리뷰 제출 완료 시 호출 추가 (photo_attached, rating, selection 파라미터 포함)
    • 리뷰 수정 시에도 실제 사진 첨부 상태를 정확히 반영하도록 수정
  • ReviewViewControllerLoad: 기존 직접 Firebase 호출을 AnalyticsService.logEvent로 변경하여 PostHog에도 전송되도록 수정

신규 이벤트 추적 추가

  • click_login: 카카오/애플/게스트 로그인 버튼 클릭 (method 파라미터)
  • complete_login: 카카오/애플 로그인 성공 (method 파라미터)
  • click_mypage_menu: 마이페이지 메뉴 항목 클릭 - 알림설정, 내 정보, 내 리뷰, 문의하기, 이용약관, 개인정보, 만든사람들, 회원탈퇴 (menu 파라미터)
  • click_logout: 로그아웃 확인
  • click_withdraw: 회원탈퇴 완료
  • click_map_all: 지도 "전체" 버튼 클릭
  • click_creator_link: 크리에이터 페이지 링크 클릭 - 인스타그램, 랜딩페이지 (type 파라미터)

이벤트 이름 통일 및 수정

  • select_dayclick_day로 변경 (안드로이드와 이벤트 이름 통일)
  • 리뷰 이벤트 이름 v1v2로 변경 (현재 리뷰 UI에 맞게)
  • click_promotion_popup 이벤트 제거 (임시 이벤트)

PostHog 설정 개선

  • captureScreenViews = true로 변경하여 screen_view 자동 캡처 활성화
  • SceneDelegate에서 Deep Link Opened 이벤트 수동 전송 추가

불필요한 import 정리

  • Presentation 레이어의 11개 ViewController에서 import FirebaseAnalytics 제거
  • 모든 이벤트가 AnalyticsService를 경유하므로 직접 import 불필요

💬리뷰 요구사항(선택)

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

  • 모든 이벤트는 AnalyticsService.logEvent를 통해 Firebase + PostHog 양쪽에 동시 전송됩니다.
  • PostHog 유저 식별(identify)은 이메일 저장 구조 확립 후 별도 PR에서 적용 예정입니다.
  • PostHog Activity에서 click_partner_restaurant, click_map, click_day 등 실시간 이벤트 수신 확인 완료했습니다.

Copilot AI review requested due to automatic review settings March 18, 2026 13:12
@Hrepay Hrepay self-assigned this Mar 18, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 PostHog 분석 시스템 도입에 맞춰 기존에 정의되었으나 호출되지 않던 이벤트들을 연결하고, 사용자 경험을 개선하기 위한 새로운 주요 인터랙션 이벤트를 추가합니다. 또한, 모든 분석 이벤트가 AnalyticsService를 통해 처리되도록 하여 불필요한 FirebaseAnalytics 직접 임포트를 제거함으로써 코드의 일관성과 유지보수성을 높였습니다.

Highlights

  • 누락된 PostHog 이벤트 연결: 제휴점 마커 클릭, 리뷰 작성 버튼 탭, 리뷰 제출 완료 시 이벤트 호출이 추가되었습니다.
  • 신규 사용자 인터랙션 이벤트 추적: 로그인 (카카오/애플/게스트), 로그인 완료 (카카오/애플), 마이페이지 메뉴 클릭, 로그아웃, 회원탈퇴, 지도 '전체' 버튼 클릭, 프로모션 팝업 인터랙션, 크리에이터 페이지 링크 클릭 등 다양한 신규 이벤트 추적이 적용되었습니다.
  • 불필요한 FirebaseAnalytics 임포트 제거: Presentation 레이어의 여러 ViewController에서 직접적인 FirebaseAnalytics 임포트가 제거되어 코드의 일관성이 향상되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


코드 흐름 따라 이벤트 심고 추적해 데이터 빛나리

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

PostHog 도입 이후 실제로 호출되지 않던 Analytics 이벤트들을 AnalyticsService 경유로 연결하고, 로그인/마이페이지/지도/프로모션/크리에이터 등 주요 인터랙션에 대한 신규 이벤트 트래킹을 추가하는 PR입니다. Presentation 레이어에서 직접 FirebaseAnalytics를 import/호출하던 패턴을 정리해 Firebase + PostHog 동시 전송 흐름을 일원화합니다.

Changes:

  • 누락되어 있던 리뷰/지도/리뷰화면 로드 이벤트 호출을 실제 UI 액션에 연결
  • 로그인/마이페이지/프로모션 팝업/크리에이터 링크/지도 “전체” 등 신규 이벤트 트래킹 추가
  • Presentation 레이어의 불필요한 import FirebaseAnalytics 제거 및 AnalyticsService 기반으로 통일

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
EATSSU/App/Sources/Presentation/Splash/SplashViewController.swift FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Splash/NoticeSplashViewController.swift FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Review/ViewController/SetRateViewController.swift 리뷰 제출 완료 시 complete_review_v1 로깅 추가
EATSSU/App/Sources/Presentation/Review/ViewController/ReviewViewController.swift 리뷰 작성 버튼/화면 로드 이벤트를 AnalyticsService 및 ReviewAnalytics로 연결
EATSSU/App/Sources/Presentation/Review/ViewController/ReportViewController.swift FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Popup/ViewController/PromotionPopupViewController.swift 프로모션 팝업 인터랙션 이벤트 로깅 추가 및 FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/MyPage/ViewController/UserWithdrawViewController.swift 회원탈퇴 완료 이벤트 로깅 추가 및 FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/MyPage/ViewController/MyReviewViewController.swift FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/MyPage/ViewController/MyPageViewController.swift 마이페이지 메뉴 클릭/로그아웃 이벤트 로깅 추가 및 FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/MyPage/ViewController/CreatorViewController.swift 크리에이터 링크 클릭 이벤트 로깅 추가 및 FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Map/ViewController/PartnershipDetailSheetViewController.swift FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Map/ViewController/NoDepartmentSheetViewController.swift FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Map/ViewController/MainMapViewController.swift 지도 “전체” 버튼 클릭 이벤트 로깅 추가 및 FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Map/ViewController/MainMapViewController+Marker.swift 제휴점 마커(상세 표시) 시 partner restaurant 클릭 이벤트 로깅 추가
EATSSU/App/Sources/Presentation/Home/ViewController/RestaurantInfoViewController.swift FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Home/ViewController/HomeViewController.swift FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Auth/ViewController/SetNickNameViewController.swift FirebaseAnalytics import 제거
EATSSU/App/Sources/Presentation/Auth/ViewController/LoginViewController.swift 로그인 클릭/완료 이벤트 로깅 추가
EATSSU/App/Sources/Data/Firebase/MapAnalyticsManager.swift click_map_all 이벤트 및 로깅 메서드 추가

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 PostHog 이벤트 추적을 통합하고 불필요한 FirebaseAnalytics 임포트를 정리하는 데 중점을 두었습니다. AnalyticsService.logEvent를 통해 모든 분석 이벤트를 중앙 집중화하여 코드의 일관성과 유지보수성을 크게 향상시켰습니다. 특히, 로그인, 마이페이지 메뉴 클릭, 리뷰 작성 및 완료 등 주요 사용자 인터랙션에 대한 새로운 이벤트 추적이 잘 적용되었습니다. 전반적으로 코드 품질과 분석 데이터의 정확성을 높이는 긍정적인 변경사항입니다.

@Hrepay Hrepay requested a review from wjdalswl March 18, 2026 13:29
Copy link
Contributor

@wjdalswl wjdalswl left a comment

Choose a reason for hiding this comment

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

확인했습니다! 수고하셨습니다!

static let clickRestaurantInfo = "click_restaurant_info"
static let selectMealTime = "select_mealtime"
static let selectDay = "select_day"
static let selectDay = "click_day"
Copy link
Contributor

Choose a reason for hiding this comment

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

이벤트 이름이랑 통일하지 않은 이유가 따로 있을까요?? 이벤트 이름에 맞게 이벤트 상수명도 동일하게 유지하면 좋을 것같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] Posthog 이벤트 점검

3 participants