-
Notifications
You must be signed in to change notification settings - Fork 0
[Refactor] AmplitudeManager 구현 및 트래킹 코드 추가 #212
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
13ef361
[Feat] #207 - AmplitudeEventTag 추가
youz2me 684e728
[Refactor] #207 - 앰플리튜드매니저 폴더 변경 및 코드 변경
JinUng41 539079e
[Refactor] #207 - 앰플리튜드 구조 변경
JinUng41 5c7b9e9
[Add] #207 - 진웅 앰플리튜드 태깅 추가 완료
JinUng41 0a048b3
[Feat] #207 - 로그인, 회원가입, 메인 홈, 상세, 글쓰기 Amplitude 구현
youz2me 03734c3
Merge remote-tracking branch 'refs/remotes/origin/refactor/#207-ampli…
youz2me a015c13
[Fix] #207 - 잘못된 개행 수정
youz2me File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| // | ||
| // AmplitudeManager.swift | ||
| // Wable-iOS | ||
| // | ||
| // Created by 김진웅 on 3/24/25. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| import AmplitudeSwift | ||
|
|
||
| final class AmplitudeManager { | ||
| static let shared = AmplitudeManager() | ||
|
|
||
| private let amplitude: Amplitude | ||
|
|
||
| private init() { | ||
| amplitude = Amplitude(configuration: Configuration(apiKey: Bundle.amplitudeAppKey)) | ||
| } | ||
|
|
||
| func trackEvent(tag: EventTag) { | ||
| amplitude.track(eventType: tag.value) | ||
| } | ||
| } | ||
|
|
||
| extension AmplitudeManager { | ||
|
|
||
| // MARK: - EventTag | ||
|
|
||
| enum EventTag: CaseIterable { | ||
| case clickCommunityBotnavi | ||
| case clickViewitBotnavi | ||
| case clickHomeBotnavi | ||
| case clickNewsBotnavi | ||
| case clickNotiBotnavi | ||
| case clickMyprofileBotnavi | ||
| case clickLikePost | ||
| case clickGhostPost | ||
| case clickWritePost | ||
| case clickDeletePost | ||
| case clickWithdrawghostPopup | ||
| case clickApplyghostPopup | ||
| case clickUploadLinkpost | ||
| case clickViralinkTeamzone | ||
| case clickApplyTeamzone | ||
| case clickUploadComment | ||
| case clickWriteComment | ||
| case clickWriteRecomment | ||
| case clickLikeComment | ||
| case clickGhostComment | ||
| case clickNews | ||
| case clickAnnouncement | ||
| case clickGameschedule | ||
| case clickRanking | ||
| case clickActivitiesnoti | ||
| case clickInfonoti | ||
| case clickSigninKakao | ||
| case clickSigninApple | ||
| case clickAgreePopupSignup | ||
| case clickNextYearSignup | ||
| case clickDetourTeamSignup | ||
| case clickNextTeamSignup | ||
| case clickChangePictureProfileSignup | ||
| case clickAddPictureProfileSignup | ||
| case clickNextProfileSignup | ||
| case clickCompleteTncSignup | ||
| case clickJoinPopupSignup | ||
| case clickUploadPost | ||
| case clickAttachPhoto | ||
| case clickWriteFirstpost | ||
| case clickCompleteLogout | ||
| case clickDeleteAccount | ||
| case clickNextDeletereason | ||
| case clickNextDeleteguide | ||
| case clickDoneDeleteaccount | ||
| case clickGobackHome | ||
|
|
||
| var value: String { | ||
| switch self { | ||
| case .clickCommunityBotnavi: return "click_community_botnavi" | ||
| case .clickViewitBotnavi: return "click_viewit_botnavi" | ||
| case .clickHomeBotnavi: return "click_home_botnavi" | ||
| case .clickNewsBotnavi: return "click_news_botnavi" | ||
| case .clickNotiBotnavi: return "click_noti_botnavi" | ||
| case .clickMyprofileBotnavi: return "click_myprofile_botnavi" | ||
| case .clickLikePost: return "click_like_post" | ||
| case .clickGhostPost: return "click_ghost_post" | ||
| case .clickWritePost: return "click_write_post" | ||
| case .clickDeletePost: return "click_delete_post" | ||
| case .clickWithdrawghostPopup: return "click_withdrawghost_popup" | ||
| case .clickApplyghostPopup: return "click_applyghost_popup" | ||
| case .clickUploadLinkpost: return "click_upload_linkpost" | ||
| case .clickViralinkTeamzone: return "click_virallink_teamzone" | ||
| case .clickApplyTeamzone: return "click_apply_teamzone" | ||
| case .clickUploadComment: return "click_upload_comment" | ||
| case .clickWriteComment: return "click_write_comment" | ||
| case .clickWriteRecomment: return "click_write_recomment" | ||
| case .clickLikeComment: return "click_like_comment" | ||
| case .clickGhostComment: return "click_ghost_comment" | ||
| case .clickNews: return "click_news" | ||
| case .clickAnnouncement: return "click_announcement" | ||
| case .clickGameschedule: return "click_gameschedule" | ||
| case .clickRanking: return "click_ranking" | ||
| case .clickActivitiesnoti: return "click_activitiesnoti" | ||
| case .clickInfonoti: return "click_infonoti" | ||
| case .clickSigninKakao: return "click_signin_kakao" | ||
| case .clickSigninApple: return "click_signin_apple" | ||
| case .clickAgreePopupSignup: return "click_agree_popup_signup" | ||
| case .clickNextYearSignup: return "click_next_year_signup" | ||
| case .clickDetourTeamSignup: return "click_detour_team_signup" | ||
| case .clickNextTeamSignup: return "click_next_team_signup" | ||
| case .clickChangePictureProfileSignup: return "click_change_picture_profile_signup" | ||
| case .clickAddPictureProfileSignup: return "click_add_picture_profile_signup" | ||
| case .clickNextProfileSignup: return "click_next_profile_signup" | ||
| case .clickCompleteTncSignup: return "click_complete_tnc_signup" | ||
| case .clickJoinPopupSignup: return "click_join_popup_signup" | ||
| case .clickUploadPost: return "click_upload_post" | ||
| case .clickAttachPhoto: return "click_attach_photo" | ||
| case .clickWriteFirstpost: return "click_write_firstpost" | ||
| case .clickCompleteLogout: return "click_complete_logout" | ||
| case .clickDeleteAccount: return "click_delete_account" | ||
| case .clickNextDeletereason: return "click_next_deletereason" | ||
| case .clickNextDeleteguide: return "click_next_deleteguide" | ||
| case .clickDoneDeleteaccount: return "click_done_deleteaccount" | ||
| case .clickGobackHome: return "click_goback_home" | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect event tag for content like action.
The event tag
.clickLikeCommentis being used for liking content/posts, but the tag name suggests it's for liking comments. This creates confusion in analytics data.Apply this diff to use the correct event tag:
📝 Committable suggestion
🤖 Prompt for AI Agents