feat: integrate GA tracking into RendingBody#179
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello @yousrchive, 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은 RendingBody 랜딩 컴포넌트에 Google Analytics 이벤트 트래킹 기능을 추가하여 사용자 행동 데이터를 수집합니다. 슬라이드 조회 및 카카오 로그인 CTA 클릭과 같은 주요 상호작용을 추적하며, 중복 트래킹을 방지하고 데이터 정확성을 높이기 위한 로직이 포함되어 있습니다. 이를 통해 사용자 경험 분석 및 서비스 개선에 필요한 인사이트를 얻을 수 있습니다. Highlights
🧠 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. Changelog
Activity
Using Gemini Code AssistThe 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
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 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully integrates GA event tracking into the RendingBody component. A critical security vulnerability related to an open redirect was identified and needs immediate attention. The use of useRef for managing slide view state and preventing duplicate events, along with proper useEffect cleanup, is well implemented. For further maintainability, consider managing repeated values like GA event names as constants.
| }); | ||
| const fireViewEventIfNeeded = (idx: number) => { | ||
| if (viewedSlidesRef.current.has(idx)) return; | ||
| trackGaEvent('rendering_slide_view', { |
There was a problem hiding this comment.
GA 이벤트 이름으로 문자열 리터럴 'rendering_slide_view'를 사용하고 있습니다. 하드코딩된 문자열은 오타에 취약하고 유지보수를 어렵게 만들 수 있습니다. src/global/constants/gaEvents.ts 파일에 이 이벤트 이름을 상수로 추가하고, GA_EVENTS 객체를 import하여 GA_EVENTS.rendering_slide_view와 같이 사용하는 것을 권장합니다. 이렇게 하면 코드의 일관성과 안정성을 높일 수 있습니다.
| trackGaEvent('rendering_slide_view', { | |
| trackGaEvent(GA_EVENTS.rendering_slide_view, { |
| }; | ||
|
|
||
| const handleKakaoLogin = async () => { | ||
| trackGaEvent('cta_click', { |
There was a problem hiding this comment.
GA 이벤트 이름으로 문자열 리터럴 'cta_click'를 사용하고 있습니다. 하드코딩된 문자열은 오타에 취약하고 유지보수를 어렵게 만들 수 있습니다. src/global/constants/gaEvents.ts 파일에 이 이벤트 이름을 상수로 추가하고, GA_EVENTS 객체를 import하여 GA_EVENTS.cta_click과 같이 사용하는 것을 권장합니다. 이렇게 하면 코드의 일관성과 안정성을 높일 수 있습니다.
| trackGaEvent('cta_click', { | |
| trackGaEvent(GA_EVENTS.cta_click, { |
|
리뷰 반영 완료했습니다. |
|
합쳐도 될 것 같은뎁쇼? 고생하셨습니다 |
요약
RendingBody 랜딩 컴포넌트에 GA 이벤트 트래킹을 연결했습니다.
구현 사항
Need Review