-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feature/#83] set up amplitude #85
Merged
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
902fbc6
#83 [FIX] : fix in app update immediate to flexible
sohyun127 e4ec3e8
#83 [FEAT] : set up amplitude sdk
sohyun127 279a20e
#83 [MOD] : add amplitude tag
sohyun127 3dc3f03
#83 [FEAT] : set up amplitude util
sohyun127 1163ef6
#83 [FEAT] : set up tracking event
sohyun127 439f67b
#83 [FIX] : fix amplitude api key
sohyun127 142e270
#83 [FIX] : api fix key load
sohyun127 607fd49
#83 [MOD] : remove unnecessary code
sohyun127 aba653d
#83 [FIX] : fix context
sohyun127 d424f73
#83 [UI] : fix feed image dialog ui
sohyun127 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 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 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 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 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 |
---|---|---|
@@ -1,7 +1,36 @@ | ||
import java.util.Properties | ||
|
||
@Suppress("DSL_SCOPE_VIOLATION") | ||
plugins { | ||
id("com.teamwable.wable.feature") | ||
} | ||
|
||
val properties = Properties().apply { | ||
load(rootProject.file("local.properties").inputStream()) | ||
} | ||
|
||
android { | ||
namespace = "com.teamwable.common" | ||
|
||
buildTypes { | ||
getByName("debug") { | ||
val amplitudeDevApiKey = properties["amplitude.dev.api.key"] as? String ?: "" | ||
buildConfigField("String", "AMPLITUDE_API_KEY", "\"${amplitudeDevApiKey}\"") | ||
} | ||
|
||
getByName("release") { | ||
val amplitudeRelApiKey = properties["amplitude.rel.api.key"] as? String ?: "" | ||
buildConfigField("String", "AMPLITUDE_API_KEY", "\"${amplitudeRelApiKey}\"") | ||
} | ||
} | ||
|
||
buildFeatures.apply { | ||
buildConfig = true | ||
} | ||
} | ||
|
||
dependencies { | ||
// Third Party | ||
implementation(libs.amplitude) | ||
implementation(libs.google.play.services) | ||
} |
71 changes: 71 additions & 0 deletions
71
core/common/src/main/java/com/teamwable/common/util/AmplitudeTag.kt
This file contains 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,71 @@ | ||
package com.teamwable.common.util | ||
|
||
object AmplitudeTag { | ||
const val CLICK_POST_UPLOAD = "click_post_upload" | ||
const val CLICK_REPLY_UPLOAD = "click_reply_upload" | ||
const val CLICK_POST_VIEW = "click_post_view" | ||
const val CLICK_POST_LIKE = "click_post_like" | ||
const val CLICK_REPLY_LIKE = "click_reply_like" | ||
const val CLICK_ACCOUNT_JOIN_DONE = "click_account_join_done" | ||
const val CLICK_ACCOUNT_DELETE_DONE = "click_account_delete_done" | ||
} | ||
|
||
object AmplitudeSignInTag { | ||
const val CLICK_SIGNIN_KAKAO = "click_signin_kakao" | ||
const val CLICK_AGREE_POPUP_SIGNUP = "click_agree_popup_signup" | ||
} | ||
|
||
object AmplitudeSignUpTag { | ||
const val CLICK_NEXT_YEAR_SIGNUP = "click_next_year_signup" | ||
const val CLICK_DETOUR_TEAM_SIGNUP = "click_detour_team_signup" | ||
const val CLICK_NEXT_TEAM_SIGNUP = "click_next_team_signup" | ||
const val CLICK_CHANGE_PICTURE_PROFILE_SIGNUP = "click_change_picture_profile_signup" | ||
const val CLICK_ADD_PICTURE_PROFILE_SIGNUP = "k_add_picture_profile_signup" | ||
const val CLICK_NEXT_PROFILE_SIGNUP = "click_next_profile_signup" | ||
const val CLICK_COMPLETE_TNC_SIGNUP = "click_complete_tnc_signup" | ||
const val CLICK_JOIN_POPUP_SIGNUP = "click_join_popup_signup" | ||
} | ||
|
||
object AmplitudeHomeTag { | ||
const val CLICK_HOME_BOTNAVI = "click_home_botnavi" | ||
const val CLICK_NEWS_BOTNAVI = "click_news_botnavi" | ||
const val CLICK_NOTI_BOTNAVI = "click_noti_botnavi" | ||
const val CLICK_MYPROFILE_BOTNAVI = "click_myprofile_botnavi" | ||
const val CLICK_LIKE_POST = "click_like_post" | ||
const val CLICK_GHOST_POST = "click_ghost_post" | ||
const val CLICK_WRITE_POST = "click_write_post" | ||
const val CLICK_DELETE_POST = "click_delete_post" | ||
const val CLICK_WITHDRAWGHOST_POPUP = "click_withdrawghost_popup" | ||
const val CLICK_APPLYGHOST_POPUP = "click_applyghost_popup" | ||
const val CLICK_LIKE_COMMENT = "click_like_comment" | ||
const val CLICK_GHOST_COMMENT = "click_ghost_comment" | ||
const val CLICK_WRITE_COMMENT = "click_write_comment" | ||
const val CLICK_GOBACK_HOME = "click_goback_home" | ||
} | ||
|
||
object AmplitudePostTag { | ||
const val CLICK_UPLOAD_POST = "click_upload_post" | ||
const val CLICK_ATTACH_PHOTO = "click_attach_photo" | ||
} | ||
|
||
object AmplitudeNewsTag { | ||
const val CLICK_GAMESCHEDULE = "click_gameschedule" | ||
const val CLICK_RANKING = "click_ranking" | ||
} | ||
|
||
object AmplitudeNotiTag { | ||
const val CLICK_ACTIVITIESNOTI = "click_activitiesnoti" | ||
const val CLICK_INFONOTI = "click_infonoti" | ||
} | ||
|
||
object AmplitudeProfileTag { | ||
const val CLICK_WRITE_FIRSTPOST = "click_write_firstpost" | ||
} | ||
|
||
object AmplitudeAuthTag { | ||
const val CLICK_DELETE_ACCOUNT = "click_delete_account" | ||
const val CLICK_NEXT_DELETEREASON = "click_next_deletereason" | ||
const val CLICK_NEXT_DELETEGUIDE = "click_next_deleteguide" | ||
const val CLICK_NEXT_DELETEACCOUNT = "click_done_deleteaccount" | ||
const val CLICK_COMPLETE_LOGOUT = "click_complete_logout" | ||
} |
24 changes: 24 additions & 0 deletions
24
core/common/src/main/java/com/teamwable/common/util/AmplitudeUtil.kt
This file contains 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,24 @@ | ||
package com.teamwable.common.util | ||
|
||
import android.content.Context | ||
import com.amplitude.android.Amplitude | ||
import com.amplitude.android.Configuration | ||
import com.teamwable.common.BuildConfig.AMPLITUDE_API_KEY | ||
|
||
object AmplitudeUtil { | ||
private lateinit var amplitude: Amplitude | ||
|
||
fun initAmplitude(applicationContext: Context) { | ||
val key = AMPLITUDE_API_KEY | ||
amplitude = Amplitude( | ||
Configuration( | ||
apiKey = key, | ||
context = applicationContext, | ||
), | ||
) | ||
} | ||
|
||
fun trackEvent(eventTag: String) { | ||
amplitude.track(eventTag) | ||
} | ||
} |
This file contains 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 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 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 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 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 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 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.
p3 : μμμ μ£Όμ ν contextλ₯Ό μ¬μ©ν΄λ λμ§ μλμ©?
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.
μ κ·Έκ±Έ λͺ»λ΄€λ€μ μμ νμ΅λλ€!
aba653d