-
Notifications
You must be signed in to change notification settings - Fork 1
Release 0.3.2 to develop #113
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,12 +2,18 @@ package com.sseotdabwa.buyornot.core.analytics | |
|
|
||
| import android.util.Log | ||
|
|
||
| class DebugAnalytics : Analytics { | ||
| class DebugAnalytics( | ||
| private val appVersion: String, | ||
| ) : Analytics { | ||
| private var userId: String? = null | ||
|
|
||
| override fun track(event: AnalyticsEvent) { | ||
| Log.d("Analytics", event.toString()) | ||
| val superProps = "platform=android, app_version=$appVersion, user_id=$userId" | ||
| Log.d("Analytics", "$event [$superProps]") | ||
|
Comment on lines
+11
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Line 11-12, Line 17์์ ์ฌ์ฉ์ ์๋ณ์๊ฐ ๊ทธ๋๋ก Logcat์ ๋จ์ต๋๋ค. ๋๋ฒ๊ทธ ํ๊ฒฝ์ด๋ผ๋ ์ธ๋ถ ๋ฐฐํฌ/๋ก๊ทธ ์์ง ์ ์ ์ถ ๊ฒฝ๋ก๊ฐ ๋ฉ๋๋ค. ์ต์ ๋ง์คํน ๋๋ ๋ก๊ทธ ์ ์ธ๊ฐ ํ์ํฉ๋๋ค. ๐ง ์ ์ ์์ ์ class DebugAnalytics(
private val appVersion: String,
) : Analytics {
private var userId: String? = null
override fun track(event: AnalyticsEvent) {
- val superProps = "platform=android, app_version=$appVersion, user_id=$userId"
+ val maskedUserId = userId?.let { "***${it.takeLast(2)}" }
+ val superProps = "platform=android, app_version=$appVersion, user_id=$maskedUserId"
Log.d("Analytics", "$event [$superProps]")
}
override fun identify(userId: String?) {
this.userId = userId
- Log.d("Analytics", "identify: userId=$userId")
+ Log.d("Analytics", "identify called")
}
}Also applies to: 16-17 ๐ค Prompt for AI Agents |
||
| } | ||
|
|
||
| override fun identify(userId: String?) { | ||
| this.userId = userId | ||
| Log.d("Analytics", "identify: userId=$userId") | ||
| } | ||
| } | ||
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.
ViewModel์์
userId์ง์ ๋ก๊น ์ ์ ๊ฑฐํ๋ ๊ฒ์ด ์์ ํฉ๋๋ค.Line 36์ ๋ก๊ทธ๋ ๊ฐ์ธ ์๋ณ์๋ฅผ ํ๋ฌธ์ผ๋ก ๋จ๊น๋๋ค.
analytics.identify(...)ํธ์ถ๋ง์ผ๋ก ๋ชฉ์ ์ด ๋ฌ์ฑ๋๋ฏ๋ก ์ง์ ๋ก๊ทธ๋ ๋นผ๋ ํธ์ด ์ข์ต๋๋ค.๐ง ์ ์ ์์ ์
Also applies to: 36-36
๐ค Prompt for AI Agents