Commit 7c78459d by 刘鹏

fix openinstall渠道统计问题修复

parent b0b34809
...@@ -107,6 +107,7 @@ class ActionCountUtils { ...@@ -107,6 +107,7 @@ class ActionCountUtils {
) { ) {
count(uid, partId, position, url, api, signs = *arrayOf(sign1)) count(uid, partId, position, url, api, signs = *arrayOf(sign1))
} }
/* /*
* *
* 测试用埋点,现在服务端统一用百度埋点 * 测试用埋点,现在服务端统一用百度埋点
...@@ -196,34 +197,43 @@ class ActionCountUtils { ...@@ -196,34 +197,43 @@ class ActionCountUtils {
*/ */
fun baiduCount(partId: String, position: String, convertType: Int) { fun baiduCount(partId: String, position: String, convertType: Int) {
val userId = ModularServiceManager.getPlatformUserService()?.getUser()?.userId ?: "" 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) { fun baiduCount(partId: String, position: String, convertType: Int, openInstallKey: String) {
val userId = ModularServiceManager.getPlatformUserService()?.getUser()?.userId ?: "" 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 ?: "" 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值 * @param openInstallKey openInstall统计渠道的key和Value值
* */ * */
fun baiduCount( fun baiduCount(
uid: String?, uid: String?,
partId: String, partId: String,
position: String, position: String,
url: String, url: String,
api: String, api: String,
convertType: Int, convertType: Int,
openInstallKey: String? openInstallKey: String?
) { ) {
try { try {
val actionDataParams = ActionDataBean.Builder() val actionDataParams = ActionDataBean.Builder()
...@@ -265,13 +275,13 @@ class ActionCountUtils { ...@@ -265,13 +275,13 @@ class ActionCountUtils {
baiduActionDataParams.convertTime(System.currentTimeMillis() / 1000) baiduActionDataParams.convertTime(System.currentTimeMillis() / 1000)
baiduActionDataParams.appid(0.toLong()) baiduActionDataParams.appid(0.toLong())
baiduActionDataParams.appName(appName) baiduActionDataParams.appName(appName)
try { try {
@SuppressLint("HardwareIds") val id = @SuppressLint("HardwareIds") val id =
Settings.Secure.getString( Settings.Secure.getString(
RxTool.getContext().contentResolver, RxTool.getContext().contentResolver,
Settings.Secure.ANDROID_ID Settings.Secure.ANDROID_ID
) )
LogUtil.e("androidid未加密:${id}") LogUtil.e("androidid未加密:${id}")
} catch (e: java.lang.Exception) { } catch (e: java.lang.Exception) {
} }
...@@ -297,14 +307,12 @@ class ActionCountUtils { ...@@ -297,14 +307,12 @@ class ActionCountUtils {
actionDataParams.sign2(gson) actionDataParams.sign2(gson)
actionDataParams.sign3(YdlCommonOut.getChannelName()) actionDataParams.sign3(YdlCommonOut.getChannelName())
//openInstall渠道统计 //openInstall渠道统计
openInstallKey?.let { actionDataParams.sign4(it) } openInstallKey?.let {
actionDataParams.sign4(it)
}
//剩余额外参数根据需求定义 //剩余额外参数根据需求定义
//请求 //请求
ActionCountUtils.request(actionDataParams.build()) ActionCountUtils.request(actionDataParams.build())
} catch (e: Exception) { } 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