Skip to content

[FIX] GA 라우트 경로별 title 추가#263

Merged
heeeeyong merged 1 commit intodevelopfrom
chore/minor-updates
Sep 26, 2025
Merged

[FIX] GA 라우트 경로별 title 추가#263
heeeeyong merged 1 commit intodevelopfrom
chore/minor-updates

Conversation

@heeeeyong
Copy link
Collaborator

@heeeeyong heeeeyong commented Sep 26, 2025

#️⃣연관된 이슈

없음

📝작업 내용

라우트 변경 시 document.title을 경로별로 설정하고, 그 뒤에 sendPageView를 호출하게 수정함.
GA가 라우트마다 다른 제목을 받아서 구분함.

💬리뷰 요구사항

없음

Summary by CodeRabbit

  • 신기능
    • 라우트별 페이지 제목 자동 설정: URL 경로 패턴에 맞춰 문서 제목이 업데이트됩니다.
    • 매칭되는 패턴이 없을 경우 기본 제목 “THIP”이 적용됩니다.
    • 다양한 페이지 이동 상황에서도 일관된 제목 표시로 브라우징 경험이 개선되었습니다.

@vercel
Copy link

vercel bot commented Sep 26, 2025

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

Project Deployment Preview Comments Updated (UTC)
thip Ready Ready Preview Comment Sep 26, 2025 7:08am

@coderabbitai
Copy link

coderabbitai bot commented Sep 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

라우트 변경 시 Google Analytics 페이지뷰를 보내기 전에 경로 패턴에 기반해 document.title을 계산·설정하도록 제어 흐름을 추가했습니다. 일치하는 타이틀이 없으면 "THIP"으로 기본값을 사용합니다. 이후 location의 path+search+hash를 조합해 페이지뷰를 전송합니다.

Changes

Cohort / File(s) Summary
레이아웃: 타이틀 설정 후 GA 페이지뷰 전송
src/components/common/Layout.tsx
경로 패턴→타이틀 매핑 로직 추가, 타이틀 기본값 "THIP" 처리, document.title 설정 후 sendPageView 호출로 순서 변경

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as User
  participant Router as Router
  participant Layout as Layout (Layout.tsx)
  participant Doc as document
  participant GA as sendPageView

  User->>Router: 경로 변경
  Router->>Layout: location 업데이트
  Note over Layout: 경로 패턴 매칭으로 타이틀 결정<br/>(없으면 "THIP")
  Layout->>Doc: document.title = 결정된 타이틀
  Layout->>GA: sendPageView(path + search + hash)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

🐞 BugFix

Poem

토끼는 귀를 쫑긋, 길을 살핀다 🐇
경로 따라 이름 붙여, 제목을 단다.
"THIP"이 기본! 띵—타이틀 반짝✨
그다음 살짝, 페이지뷰 휙↗
발자국 남기고, 다음 길로 퐁퐁!

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/minor-updates

📜 Recent review details

Configuration used: CodeRabbit 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 040ef0f and 0db8dbc.

📒 Files selected for processing (1)
  • src/components/common/Layout.tsx (1 hunks)

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.

@heeeeyong heeeeyong merged commit c21ecf3 into develop Sep 26, 2025
2 of 3 checks passed
@heeeeyong heeeeyong self-assigned this Sep 26, 2025
@heeeeyong heeeeyong added the 📃 Docs Improvements or additions to documentation label Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📃 Docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant