Skip to content

Comments

feat: 온보딩 스텝 별 Gtag 추가#260

Merged
jllee000 merged 1 commit intodevelopfrom
feat/#259/onboarding-step-GA
Feb 19, 2026
Merged

feat: 온보딩 스텝 별 Gtag 추가#260
jllee000 merged 1 commit intodevelopfrom
feat/#259/onboarding-step-GA

Conversation

@jllee000
Copy link
Collaborator

@jllee000 jllee000 commented Feb 19, 2026

📌 Related Issues

관련된 Issue를 태그해주세요. (e.g. - close #25)

📄 Tasks

온보딩 스텝별 Gtag 추가했습니다!

⭐ PR Point (To Reviewer)

기획자 로그 네이밍 혼돈을 막기 위해, gtag 네임, 페이지 네임 등을 모두 통일하였습니다.

  1. 온보딩 스토리 부분: onboard-step1 ~ step3
  2. 소셜 로그인: onboard-social-login-step
  3. 알람 스텝: onboard-alarm-step

📷 Screenshot

image

Summary by CodeRabbit

릴리스 노트

  • 개선 사항
    • 온보딩 단계별 사용자 행동 추적 기능 강화: 단계 진행 시 및 알람 설정, 소셜 로그인 단계 진입 시 분석 이벤트 추가로 온보딩 과정의 데이터 수집 개선

@vercel
Copy link

vercel bot commented Feb 19, 2026

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

Project Deployment Actions Updated (UTC)
pinback-client-client Ready Ready Preview, Comment Feb 19, 2026 8:25am
pinback-client-landing Ready Ready Preview, Comment Feb 19, 2026 8:25am

@jllee000 jllee000 self-assigned this Feb 19, 2026
@jllee000 jllee000 added the feat 기능 개발하라 개발 달려라 달려 label Feb 19, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

Walkthrough

온보딩 단계 컴포넌트 3개에 Google Analytics 이벤트 추적을 추가했습니다. MainCard에서는 단계 진행 시 이벤트를 발송하고, AlarmStep과 SocialLoginStep에서는 컴포넌트 마운트 시 GA 이벤트를 전송합니다.

Changes

Cohort / File(s) Summary
온보딩 단계별 GA 추적 추가
apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx, apps/client/src/pages/onBoarding/components/funnel/step/AlarmStep.tsx, apps/client/src/pages/onBoarding/components/funnel/step/SocialLoginStep.tsx
sendGAEvent 임포트 및 GA 이벤트 추적 로직 추가. MainCard는 nextStep 함수에서 단계 진행 이벤트 발송, AlarmStep과 SocialLoginStep은 useEffect 훅으로 마운트 시 이벤트 전송.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

🛠️ Feature

Suggested reviewers

  • jjangminii
  • constantly-dev

Poem

🐰 분석 마법을 불어넣으니,
단계마다 반짝이는 추적 빛,
사용자의 발걸음 하나하나를,
이제 GA가 알게 되네! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning PR은 #259(온보딩 스텝 GA 추가)의 요구사항을 충족하지만, #25(Progress bar 구현)과는 무관한 변경사항을 포함합니다. 이 PR은 #259만 다루어야 합니다. #25는 별도 PR에서 처리하거나 링크 이슈에서 제거하세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 '온보딩 스텝 별 Gtag 추가'로, 변경사항의 주요 목적(GA 이벤트 추가)을 명확히 반영하고 있습니다.
Description check ✅ Passed PR 설명은 템플릿을 따르고 있으며, 관련 이슈, 작업 내용, 리뷰어 포인트, 스크린샷을 모두 포함하고 있습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항(MainCard.tsx, AlarmStep.tsx, SocialLoginStep.tsx)이 #259의 GA 이벤트 추가 목표와 관련되어 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#259/onboarding-step-GA

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@github-actions
Copy link

✅ Storybook chromatic 배포 확인:
🐿️ storybook

Copy link

@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: 1

🧹 Nitpick comments (1)
apps/client/src/pages/onBoarding/components/funnel/step/SocialLoginStep.tsx (1)

10-14: sendGAEvent의 세 인수가 모두 동일한 문자열입니다

sendGAEvent(action, category, label, value) 시그니처에서 categorylabel은 Google Analytics에서 이벤트를 필터링하고 분류하기 위한 별도의 파라미터입니다. 세 값을 모두 동일하게 전달하면 이러한 필드들의 분석 가치가 사라집니다.

동일한 패턴이 AlarmStep, MainCard 등 여러 컴포넌트에서 반복되므로, 각 파라미터에 의미있는 서로 다른 값을 할당하여 Analytics 데이터의 구분력을 높이는 것을 권장합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/onBoarding/components/funnel/step/SocialLoginStep.tsx`
around lines 10 - 14, The call to sendGAEvent currently passes the same string
for action, category, and label which loses analytic granularity; update calls
in SocialLoginStep (and similar occurrences in AlarmStep and MainCard) to supply
distinct, meaningful values: use a concise action (e.g., 'social_login_click'),
a component/category identifier (e.g., 'onboarding_funnel' or
'social_login_step'), and a descriptive label (e.g., 'google_button' or
'facebook_button') so each parameter reflects its role in sendGAEvent(action,
category, label, value); ensure any fourth value is used consistently if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx`:
- Around line 188-192: The sendGAEvent call inside nextStep is firing for ALARM
and MAC steps because it runs before the existing early returns; update nextStep
so sendGAEvent is only invoked for story steps by guarding it with the imported
storySteps (or equivalent check using idx), e.g., check that the current idx is
within storySteps before calling sendGAEvent; keep existing shouldSkipMacStep
and isFinalStep early returns intact and reference sendGAEvent, nextStep,
shouldSkipMacStep, isFinalStep, storySteps and idx when making the change.

---

Duplicate comments:
In `@apps/client/src/pages/onBoarding/components/funnel/step/AlarmStep.tsx`:
- Around line 11-15: The call to sendGAEvent in AlarmStep.tsx is passing the
same string for all three parameters; update the call to supply distinct,
meaningful values matching sendGAEvent's signature (e.g., category, action,
label) instead of repeating 'onboard-alarm-step' — mirror the corrected pattern
from SocialLoginStep.tsx and use identifiers like 'onboard', 'alarm-step', and a
contextual label such as 'alarm-permission-granted' or 'alarm-permission-prompt'
to reflect the actual event semantics.

---

Nitpick comments:
In `@apps/client/src/pages/onBoarding/components/funnel/step/SocialLoginStep.tsx`:
- Around line 10-14: The call to sendGAEvent currently passes the same string
for action, category, and label which loses analytic granularity; update calls
in SocialLoginStep (and similar occurrences in AlarmStep and MainCard) to supply
distinct, meaningful values: use a concise action (e.g., 'social_login_click'),
a component/category identifier (e.g., 'onboarding_funnel' or
'social_login_step'), and a descriptive label (e.g., 'google_button' or
'facebook_button') so each parameter reflects its role in sendGAEvent(action,
category, label, value); ensure any fourth value is used consistently if needed.

Comment on lines +188 to +192
sendGAEvent(
`onboard-step-${idx + 1}`,
`onboard-step-${idx + 1}`,
`onboard-step-${idx + 1}`
);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find apps/client/src/pages/onBoarding -type f -name "*.ts*" | head -20

Repository: Pinback-Team/pinback-client

Length of output: 1031


🏁 Script executed:

cat apps/client/src/pages/onBoarding/constants/stepOrder.ts 2>/dev/null || \
cat apps/client/src/pages/onBoarding/constants.ts 2>/dev/null || \
rg -l "stepOrder|storySteps" apps/client/src/pages/onBoarding --type ts

Repository: Pinback-Team/pinback-client

Length of output: 196


🏁 Script executed:

rg -A 20 "export.*stepOrder|export.*storySteps|export.*Step\s*=" apps/client/src/pages/onBoarding --type ts

Repository: Pinback-Team/pinback-client

Length of output: 2228


🏁 Script executed:

cat -n apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx | head -250

Repository: Pinback-Team/pinback-client

Length of output: 9164


🏁 Script executed:

cat -n apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx | sed -n '150,200p'

Repository: Pinback-Team/pinback-client

Length of output: 1789


🏁 Script executed:

cat -n apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx | sed -n '155,220p'

Repository: Pinback-Team/pinback-client

Length of output: 2240


🏁 Script executed:

cat -n apps/client/src/pages/onBoarding/components/funnel/step/AlarmStep.tsx | grep -A 10 -B 5 "sendGAEvent\|onboard-alarm"

Repository: Pinback-Team/pinback-client

Length of output: 1065


🏁 Script executed:

cat -n apps/client/src/pages/onBoarding/components/funnel/step/AlarmStep.tsx | head -80

Repository: Pinback-Team/pinback-client

Length of output: 1556


🏁 Script executed:

cat -n apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx | sed -n '235,260p'

Repository: Pinback-Team/pinback-client

Length of output: 898


🏁 Script executed:

cat -n apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx | sed -n '235,280p'

Repository: Pinback-Team/pinback-client

Length of output: 948


스토리 단계 외 ALARM·MAC 단계에서 의도치 않은 GA 이벤트가 발생합니다

nextStepsendGAEvent 호출은 두 가지 early-return(shouldSkipMacStep, isFinalStep) 이후에만 가드됩니다. 따라서 Mac 사용자가 다음 단계로 진행할 때:

  • ALARM 단계 (idx = 4): shouldSkipMacStepfalse가 되어 sendGAEvent('onboard-step-5', ...) 가 발생합니다. AlarmStep.tsxuseEffect가 이미 'onboard-alarm-step'을 발송하므로, 같은 스텝에서 두 번의 이벤트가 발생합니다.
  • MAC 단계 (idx = 5): early-return이 없어 sendGAEvent('onboard-step-6', ...) 가 발생합니다.

onboard-step-4 이상의 이벤트명은 PR의 의도(onboard-step-1~3은 스토리 단계 전용)와 맞지 않아 Analytics 데이터를 오염시킵니다.

이미 import된 storySteps로 가드를 추가하면 해결됩니다:

🐛 제안 수정
     setDirection(1);
     setStep(next);
     navigate(`/onboarding?step=${next}`);
+    if (storySteps.includes(step)) {
       sendGAEvent(
         `onboard-step-${idx + 1}`,
         `onboard-step-${idx + 1}`,
         `onboard-step-${idx + 1}`
       );
+    }
   };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
sendGAEvent(
`onboard-step-${idx + 1}`,
`onboard-step-${idx + 1}`,
`onboard-step-${idx + 1}`
);
if (storySteps.includes(step)) {
sendGAEvent(
`onboard-step-${idx + 1}`,
`onboard-step-${idx + 1}`,
`onboard-step-${idx + 1}`
);
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx` around lines
188 - 192, The sendGAEvent call inside nextStep is firing for ALARM and MAC
steps because it runs before the existing early returns; update nextStep so
sendGAEvent is only invoked for story steps by guarding it with the imported
storySteps (or equivalent check using idx), e.g., check that the current idx is
within storySteps before calling sendGAEvent; keep existing shouldSkipMacStep
and isFinalStep early returns intact and reference sendGAEvent, nextStep,
shouldSkipMacStep, isFinalStep, storySteps and idx when making the change.

@jllee000 jllee000 merged commit c8a4ff8 into develop Feb 19, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 기능 개발하라 개발 달려라 달려

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] Google GA 적용 추가

2 participants