diff --git a/.github/workflows/pr_builder.yml b/.github/workflows/pr_builder.yml
index 769ac998f..4267d67c1 100644
--- a/.github/workflows/pr_builder.yml
+++ b/.github/workflows/pr_builder.yml
@@ -47,11 +47,6 @@ jobs:
HFM_BASE_URL: ${{ secrets.BASE_URL }}
run: echo "base.url=\"$BASE_URL\"" >> local.properties
- - name: Access ACCESS_TOKEN
- env:
- ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- run: echo "access.token=\"$ACCESS_TOKEN\"" >> local.properties
-
- name: Access IO_SENTRY_DSN
env:
IO_SENTRY_TOKEN: ${{ secrets.IO_SENTRY_DSN }}
@@ -67,6 +62,11 @@ jobs:
KAKAO_NATIVE_APP_KEY: ${{ secrets.KAKAO_NATIVE_APP_KEY }}
run: echo "kakao.native.app.key=\"$KAKAO_NATIVE_APP_KEY\"" >> local.properties
+ - name: Access AMPLITUDE_API_KEY
+ env:
+ KAKAO_NATIVE_APP_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
+ run: echo "amplitude.api.key=\"AMPLITUDE_API_KEY\"" >> local.properties
+
- name: Access DEFAULTS_ORG
env:
DEFAULTS_ORG: ${{ secrets.DEFAULTS_ORG }}
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 8600388f8..f637cceaf 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -42,6 +42,7 @@ android {
"KAKAO_NATIVE_APP_KEY",
properties["kakao.native.app.key"].toString()
)
+ buildConfigField("String", "AMPLITUDE_API_KEY", properties["amplitude.api.key"].toString())
manifestPlaceholders["IO_SENTRY_DSN"] = properties["io.sentry.dsn"] as String
manifestPlaceholders["KAKAO_NATIVE_APP_KEY_MANIFEST"] = properties["kakao.native.app.key.manifest"] as String
@@ -115,6 +116,9 @@ dependencies {
// Kakao
implementation(libs.kakao)
+
+ // Amplitude
+ implementation(libs.amplitude)
}
ktlint {
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index edf2f071c..f51aae814 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -5,6 +5,7 @@
+
trackEventWithProperty(eventName: String, propertyName: String, propertyValue: T) {
+ amplitude.track(
+ eventType = eventName,
+ eventProperties = mapOf(propertyName to propertyValue)
+ )
+ }
+
+ fun trackEventWithProperties(eventName: String, properties: Map) {
+ amplitude.track(eventType = eventName, eventProperties = properties)
+ }
+}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 65174107b..35f929f10 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -41,6 +41,7 @@ naver-maps = "3.17.0"
play-services-location = "21.0.1"
progress-bar = "1.1.3"
kakao = "2.15.0"
+amplitude = "1.+"
[libraries]
# AndroidX
@@ -83,6 +84,7 @@ naver-maps = { group = "com.naver.maps", name = "map-sdk", version.ref = "naver-
play-services-location = { group = "com.google.android.gms", name = "play-services-location", version.ref = "play-services-location" }
progress-bar = { group = "com.github.skydoves", name = "progressview", version.ref = "progress-bar" }
kakao = { group = "com.kakao.sdk", name = "v2-user", version.ref = "kakao" }
+amplitude = { group = "com.amplitude", name = "analytics-android", version.ref = "amplitude" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }