Skip to content

Feat/#460 GA 이벤트 추가 #471

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

Merged
merged 11 commits into from
Sep 27, 2023
Merged

Feat/#460 GA 이벤트 추가 #471

merged 11 commits into from
Sep 27, 2023

Conversation

ukkodeveloper
Copy link
Collaborator

📝작업 내용

  • GA 이벤트 추가를 위한 유틸함수 추가
  • 플레이 버튼, 좋아요, 공유, 프로필편집, 로그아웃,

작업내용

💬리뷰 참고사항

  • [ 노래 듣기 세부 페이지 ]Category: song_playing
    • 플레이
    • 좋아요
    • 공유
  • [ 프로필 페이지 ] Category: profile
    • 프로필편집
    • 로그아웃

#️⃣연관된 이슈

close #460

@ukkodeveloper ukkodeveloper self-assigned this Sep 27, 2023
@ukkodeveloper ukkodeveloper added [ 🌞 FE ] 프론트엔드 크루들의 빛나는 개발 이야기 하나둘셋 호! ✨ Feat 꼼꼼한 기능 구현 중요하죠 labels Sep 27, 2023
@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Unit Test Results

  82 files    82 suites   11s ⏱️
313 tests 313 ✔️ 0 💤 0
316 runs  316 ✔️ 0 💤 0

Results for commit a436cb0.

♻️ This comment has been updated with latest results.

sendGAEvent({
action: 'click_copy',
category: 'song_playing',
memberId: user?.memberId,
Copy link
Collaborator

Choose a reason for hiding this comment

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

useruser.memberId가 없는 경우 어떻게 되나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  1. 컴포넌트에서 user(전역 상태)를 사용하지 않는 경우 => 집계하지 않는다는 의미로 -2 플래그를 준다.
  2. 로그인이 되어있지 않는 유저 => -1 플래그를 준다

💬 이렇게 어떠신가요?

Copy link
Collaborator

@Creative-Lee Creative-Lee left a comment

Choose a reason for hiding this comment

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

GA 기가맥힙니다...!
어떤식으로 사용하는 것인지도 잘 설명해주셔서 이해했습니다
고생하셨습니다~!

Comment on lines 53 to 58
sendGAEvent({
action: 'click_copy',
category: 'song_playing',
memberId: user?.memberId,
});

Copy link
Collaborator

Choose a reason for hiding this comment

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

action과 category도 기준을 정해서 상수화 하면 좋겠네요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

상수화 완료!

if (isNowPlayingTrack) {
stopTrack();
} else {
playTrack();
}
};

const onLikeButton = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

💬 요것도 네이밍을 likes 의 의미를 담아서 바꿔보면 좋을 것 같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

네이밍 변경 완료!

@ukkodeveloper
Copy link
Collaborator Author

ukkodeveloper commented Sep 27, 2023

  1. actions : 이벤트 이름을 명명합니다.
  2. categories: 이벤트의 묶음 단위 그룹화한 이름입니다. 현재는 페이지 구분만으로 그룹화가 가능해서 song_plaing, profile 로 나누어서 구분했습니다. (기본값 none)
  3. member ids: 유저의 id를 나타냅니다. 로그인되어있지 않은 경우 -1, 로그인 정보(전역 상태)가 없는 컴포넌트에서 사용시 -2로 두었습니다. (기본값 -2)

결정된 사항

  • 로그인 되어 있지 않은 이벤트는 -1 사용.
  • GA를 위해 memberId를 수집할 수 있도록 user 전역 상태를 사용.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ukkodeveloper ukkodeveloper merged commit e23e1c3 into main Sep 27, 2023
@ukkodeveloper ukkodeveloper deleted the feat/#460 branch September 27, 2023 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ 🌞 FE ] 프론트엔드 크루들의 빛나는 개발 이야기 하나둘셋 호! ✨ Feat 꼼꼼한 기능 구현 중요하죠
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[FEAT] 좋아요, 공유, 플레이 이벤트에 GA 등록하기
3 participants