Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#650] 구글 애널리틱스 추가 #651

Merged
merged 3 commits into from
Jul 10, 2024
Merged

[#650] 구글 애널리틱스 추가 #651

merged 3 commits into from
Jul 10, 2024

Conversation

hanyugeon
Copy link
Member

@hanyugeon hanyugeon commented Jun 27, 2024

구현 내용

구글 애널리틱스를 추가했어요

개르발민족 계정의 구글 애널리틱스 페이지에서 통계를 확인해 볼 수 있어요!
개르발민족 계정 로그인 이후 여기에서 확인할 수 있어요!

해당 미디엄 블로그의 내용을 참고하여 구현하였습니다.

pr 포인트

동작 방식

  1. utils/gtag.tseventpageview 함수를 통해 페이지가 몇 번 노출되었는지, 이벤트들은 얼마나 동작하였는지 수집해요.
  2. GoogleAnalytics.tsx컴포넌트에 gtag.ts 유틸들을 일괄적으로 import하고 script를 작성해요
  3. 최종적으로 Layout.tsxGoogleAnalytics.tsx를 삽입하여 이벤트와 페이지 노출 횟수와 같은 자료를 구글에 전달해요.

바뀐점

  • devDependencies@types/gtag.js가 추가되었어요.
  • release 프로덕션 브랜치에 머지되면 GA가 최종 작동합니다!
    dadok.app 도메인 모두 통계자료에 집계되고있네요.. 😅

관련 이슈

@hanyugeon hanyugeon added 🐥 프론트 필수! ✨ feature New feature or request 🔥 v.1.0 New feature for releasing v.1.0 labels Jun 27, 2024
@hanyugeon hanyugeon requested a review from gxxrxn June 27, 2024 12:12
@hanyugeon hanyugeon self-assigned this Jun 27, 2024
Copy link

vercel bot commented Jun 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dadok ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2024 0:12am

Copy link

Copy link

⚡️ Lighthouse Average Scores Across Reports:

Category Score
🔴 performance 69
🟢 accessibility 91
🟢 best practices 99
🟢 seo 100
🟢 pwa 100

⚡️ Average Details Across All Reports:

Category Score
🟢 first contentful paint 0.8s
🔴 largest contentful paint 12.2s
🟠 interactive 6.3s
🟢 total blocking time 270.0ms
🟢 cumulative layout shift 0.0

Copy link
Member

@gxxrxn gxxrxn left a comment

Choose a reason for hiding this comment

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

와! 너무 좋아요!! 종종 들어가봐야겠군요~!! 😀 수고많으셨습니다! 👍🏻

@hanyugeon hanyugeon merged commit 52f6fdf into main Jul 10, 2024
4 checks passed
@hanyugeon hanyugeon deleted the feat/#650 branch July 11, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request 🐥 프론트 필수! 🔥 v.1.0 New feature for releasing v.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

구글 애널리틱스 추가
2 participants