【packID】数数打点新增字段

dev_chengFeng
gaoxin 2021-07-27 10:04:22 +08:00
parent 509f34e19b
commit d4e78afcab
3 changed files with 12 additions and 3 deletions

View File

@ -32,6 +32,11 @@ end
-- 获取包名
function PackageManager.GetPackageID()
-- 优先使用sdk自带的
if LoginManager.SdkSubChannel then
return LoginManager.SdkSubChannel
end
-- 否则使用配置的
if this.StreamConfig then
return this.StreamConfig.PackID
end

View File

@ -1,4 +1,4 @@
LoginManager = {};
LoginManager = {};
local this = LoginManager
this.sign = "d13b3e8ef74bf72d8aafce3a1c8672a0"
this.openId = nil
@ -44,6 +44,7 @@ function this.Initialize()
AppConst.SdkChannel = result[5] or ""
this.extData = result[6] or ""
this.p_appId = result[7] or ""
this.SdkSubChannel = result[8]
AppConst.SdkPackageName = AndroidDeviceInfo.Instance:GetPackageName()
end
-- 判断是否是注册并登录
@ -102,7 +103,8 @@ function this.TrackCreateAccount()
account = AppConst.isSDK and tostring(AppConst.OpenId) or "",
Bundle_id = AppConst.isSDK and AppConst.SdkPackageName or "",
xx_id = AppConst.isSDK and AppConst.SdkChannel or "",
device_id = AppConst.isSDK and ThinkingAnalyticsManager.GetDeviceId() or ""
device_id = AppConst.isSDK and ThinkingAnalyticsManager.GetDeviceId() or "",
packId = PackageManager.GetPackageID() or "",
})
ThinkingAnalyticsManager.Track("create_account")
end

View File

@ -45,7 +45,8 @@ function this.LoginRequest(openId, func)
data.distinct_id = AppConst.isSDK and ThinkingAnalyticsManager.GetDistinctId() or ""
data.openId = openId
data.cc_id = PackageManager.GetCCCode()
data.channel_s = AppConst.isSDKLogin and AppConst.SdkChannel .. "#" .. AppConst.SdkPackageName or "" --pt_pid.."#"..pt_gid
local packId = PackageManager.GetPackageID() or ""
data.channel_s = AppConst.isSDKLogin and AppConst.SdkChannel .. "#" .. AppConst.SdkPackageName .."#".. packId or "" --pt_pid.."#"..pt_gid
data.platform_s = AppConst.Platform --and "ADR" or "PC"
local msg = data:SerializeToString()
@ -72,6 +73,7 @@ function this.LoginRequest(openId, func)
account = AppConst.isSDK and tostring(AppConst.OpenId) or "",
Bundle_id = AppConst.isSDK and AppConst.SdkPackageName or "",
xx_id = AppConst.isSDK and AppConst.SdkChannel or "",
packId = PackageManager.GetPackageID() or "",
-- test_list = "1,2,3#2", -- 数组
})
TapDBManager.SetServer(LoginManager.ServerId)