pid를 심어놓은 광고를 타고 들어온 경우 항상 AppLaunch 이벤트를 실행하는 코드 추가

This commit is contained in:
2025-03-26 16:37:49 +09:00
parent b50df2cdf3
commit 4d87544b7b
9 changed files with 61 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
package kr.co.vividnext.sodalive.tracking
import io.reactivex.rxjava3.core.Single
import kr.co.vividnext.sodalive.common.ApiResponse
import retrofit2.http.Body
import retrofit2.http.POST
interface AdTrackingApi {
@POST("/ad-tracking/app-launch")
fun appLaunch(@Body request: AdTrackingAppLaunchRequest): Single<ApiResponse<Any>>
}

View File

@@ -0,0 +1,9 @@
package kr.co.vividnext.sodalive.tracking
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class AdTrackingAppLaunchRequest(
@SerializedName("pid") val pid: String
)

View File

@@ -0,0 +1,5 @@
package kr.co.vividnext.sodalive.tracking
class AdTrackingRepository(private val api: AdTrackingApi) {
fun appLaunch(pid: String) = api.appLaunch(request = AdTrackingAppLaunchRequest(pid = pid))
}