Commit 7c78459d by 刘鹏

fix openinstall渠道统计问题修复

parent b0b34809
......@@ -107,6 +107,7 @@ class ActionCountUtils {
) {
count(uid, partId, position, url, api, signs = *arrayOf(sign1))
}
/*
*
* 测试用埋点,现在服务端统一用百度埋点
......@@ -196,34 +197,43 @@ class ActionCountUtils {
*/
fun baiduCount(partId: String, position: String, convertType: Int) {
val userId = ModularServiceManager.getPlatformUserService()?.getUser()?.userId ?: ""
baiduCount(userId, partId, position, "", "", convertType,"")
baiduCount(userId, partId, position, "", "", convertType, "")
}
/**
* 百度检测数据埋点调用的方法
*/
fun baiduCount(partId: String, position: String, convertType: Int, openInstallKey: String) {
val userId = ModularServiceManager.getPlatformUserService()?.getUser()?.userId ?: ""
baiduCount(userId, partId, position, "", "", convertType,"")
baiduCount(userId, partId, position, "", "", convertType, openInstallKey)
}
/**
* 百度检测数据埋点调用的方法
*/
fun baiduCount( uid: String?, partId: String, position: String, url: String, api: String, convertType: Int) {
fun baiduCount(
uid: String?,
partId: String,
position: String,
url: String,
api: String,
convertType: Int
) {
val userId = ModularServiceManager.getPlatformUserService()?.getUser()?.userId ?: ""
baiduCount(userId, partId, position, url, api, convertType,"")
baiduCount(userId, partId, position, url, api, convertType, "")
}
/**
* @param openInstallKey openInstall统计渠道的key和Value值
* */
fun baiduCount(
uid: String?,
partId: String,
position: String,
url: String,
api: String,
convertType: Int,
openInstallKey: String?
uid: String?,
partId: String,
position: String,
url: String,
api: String,
convertType: Int,
openInstallKey: String?
) {
try {
val actionDataParams = ActionDataBean.Builder()
......@@ -265,13 +275,13 @@ class ActionCountUtils {
baiduActionDataParams.convertTime(System.currentTimeMillis() / 1000)
baiduActionDataParams.appid(0.toLong())
baiduActionDataParams.appName(appName)
try {
try {
@SuppressLint("HardwareIds") val id =
Settings.Secure.getString(
RxTool.getContext().contentResolver,
Settings.Secure.ANDROID_ID
)
LogUtil.e("androidid未加密:${id}")
LogUtil.e("androidid未加密:${id}")
} catch (e: java.lang.Exception) {
}
......@@ -297,14 +307,12 @@ class ActionCountUtils {
actionDataParams.sign2(gson)
actionDataParams.sign3(YdlCommonOut.getChannelName())
//openInstall渠道统计
openInstallKey?.let { actionDataParams.sign4(it) }
openInstallKey?.let {
actionDataParams.sign4(it)
}
//剩余额外参数根据需求定义
//请求
ActionCountUtils.request(actionDataParams.build())
} catch (e: Exception) {
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment