Skip to main content

用户行为数据上报

媒体发起搜索推荐请求后,响应中会返回行为数据上报的链接,相关字段参考上文2.2.3.2。需要对链接中进行宏替换,其中宏会以双下划线开头和结尾,例如:EVENT_TIME。需要对其替换为对应的实际值,否则上报将会失败。

上报成功,将统一返回如下的数据。

{
 "code" : 0,   // 0表示成功,其他值表示失败
  "msg" :  "" 
}

2.3.1 宏规则#

当前行为数据存在的宏规则如表格所示

替换的值类型是否必填含义
EVENT_TIMEint64数据上报时间(秒)
GAME_IDstring上报的媒体方的游戏id
DOWNLOAD_EVENT_TYPEstring下载链接中携带的宏,可替换的备选值参考2.3.4中下载上报描述

2.3.2 曝光#

对应搜索推荐响应中的Tracking.impression_url字段。

请求方法:GET

请求示例:

https://api.ykysearch.qq.com/v1/data-
report/impression?request_id=180578a2d2dfe3eb3def407257bec5b5&param=sJDmeca
aLii_Mqee-FU2emUPuD_FA_QBXIQLhBLdgzi4Vvo5Vk-
UvCQaUIIvd2rBchkLDm3iQGmD6H00w1c6JeiU6TVajVsoy-gQoL0pnEblzaOYvY
f4N7iW7pR0KfuFY9mqIgOeaZh6AJRkemp-cCZjeW4OiNa0mbVqSfkrKcS_NKoEpgFf-
w5DBD1gyncob0gKU9aUeLPRfpvzN7JJ-ovrDj_GRQSHGJEXQ1d7giL8k1kxm-BQ3yRiNWS-
jRHUPoJWPTBlcuhd0hzYcFzINXX5kjPuX_XVv1C3FIewMdyixIT82bMMDTJWw5hbroOgmCeQgYw
W9PSwRPkv5MgNs0DabQCOS2na7pIVAIHwG0XNsO5gLKHp
TXmXv_xu-EKeDxFFEWgrEsxoiI35iYKSj-
ajBZTrR4hT_yrsOhrV8r8AHl5_UFoAPGanC6aShTgc1fdhif35a3vMlHcVHDUJcxOMfpSeS0Bjg
8yL9enFNVRMDxzKVyRJm241fm9dxSQeYlJ40QnZaq4k75lvpRbdxlCzAHMeACBQaILL4KrbX-
Kiipqatk1tbCRkJnaDuGivxOzI9iVrgJ7umypGRKMIQsDjCPP-
JZBlT7kkFSghZVWUY8zlFvGyE5
_SuCodOXyMD_LdrWe9QCwqXt6IPnEM_TLG6dNj8HYdffkBa50iOe3GxWrCjjplP_RZEf9DIJQ_x
x8isJrhi0VokQ8vst35R_jP6MH-
mPh3Y9pVCa13jquvq9HPA2E8EMPdclsMBjuzbi1OpC1oh1KfSgt0D_wV2AkQmYfLPngUQ1V0_Fe
RZwgKCTMEAYlDul5NPhHzc2wiHuD5H8hWh6ZG42fyiJ6nVetlzhcDGlDj6i_nNsVGuj8aFUg3k_
tLJVdJ
o8llByqIoCuOK2s-k6tbnMztlCfIzXUR7pu-z7nq0-
hg8gYwbqdwUa1MhmVGHIjpR0IqPQZrCoj_Trp0PSH_r2xvq_AjCZxS6gNPSET07t-
GsdynQOD74IKzkaYXrmI6wMB7nA1blHVFLqpOqeteUvXUBHk-
MAvmqTAlZG-4qEukiNpBBVh1gxRLYl2uffd-9n1wFUxY28Ou-yoUeUCgpNCll3seeZ-
RZ3WTTyDBsPjZ4fGLKCkcC4NbbUxj4Edawg
S6QCVtcvQ3-
fJMYhhhGX6IbOo_I6sE8FN0B_dG&media_app_id=123456&behavior_time=__EVENT_TIME__
&game_id=__GAME_ID__

2.3.3 点击#

对应搜索推荐响应中的Tracking.click_url字段。

请求方法:GET

请求示例:

https://api.ykysearch.qq.com/v1/data-
report/click?request_id=180578a2d2dfe3eb3def407257bec5b5&param=sJDmecaaLii_
Mqee-FU2emUPuD_FA_QBXIQLhBLdgzi4Vvo5Vk-
UvCQaUIIvd2rBchkLDm3iQGmD6H00w1c6JeiU6TVajVsoy-gQoL0pnEblzaOYvY
f4N7iW7pR0KfuFY9mqIgOeaZh6AJRkemp-cCZjeW4OiNa0mbVqSfkrKcS_NKoEpgFf-
w5DBD1gyncob0gKU9aUeLPRfpvzN7JJ-ovrDj_GRQSHGJEXQ1d7giL8k1kxm-BQ3yRiNWS-
jRHUPoJWPTBlcuhd0hzYcFzINXX5kjPuX_XVv1C3FIewMdyixIT82bMMDTJWw5hbroOgmCeQgYw
W9PSwRPkv5MgNs0DabQCOS2na7pIVAIHwG0XNsO5gLKHp
TXmXv_xu-EKeDxFFEWgrEsxoiI35iYKSj-
ajBZTrR4hT_yrsOhrV8r8AHl5_UFoAPGanC6aShTgc1fdhif35a3vMlHcVHDUJcxOMfpSeS0Bjg
8yL9enFNVRMDxzKVyRJm241fm9dxSQeYlJ40QnZaq4k75lvpRbdxlCzAHMeACBQaILL4KrbX-
Kiipqatk1tbCRkJnaDuGivxOzI9iVrgJ7umypGRKMIQsDjCPP-
JZBlT7kkFSghZVWUY8zlFvGyE5
_SuCodOXyMD_LdrWe9QCwqXt6IPnEM_TLG6dNj8HYdffkBa50iOe3GxWrCjjplP_RZEf9DIJQ_x
x8isJrhi0VokQ8vst35R_jP6MH-
mPh3Y9pVCa13jquvq9HPA2E8EMPdclsMBjuzbi1OpC1oh1KfSgt0D_wV2AkQmYfLPngUQ1V0_Fe
RZwgKCTMEAYlDul5NPhHzc2wiHuD5H8hWh6ZG42fyiJ6nVetlzhcDGlDj6i_nNsVGuj8aFUg3k_
tLJVdJ
o8llByqIoCuOK2s-k6tbnMztlCfIzXUR7pu-z7nq0-
hg8gYwbqdwUa1MhmVGHIjpR0IqPQZrCoj_Trp0PSH_r2xvq_AjCZxS6gNPSET07t-
GsdynQOD74IKzkaYXrmI6wMB7nA1blHVFLqpOqeteUvXUBHk-
MAvmqTAlZG-4qEukiNpBBVh1gxRLYl2uffd-9n1wFUxY28Ou-yoUeUCgpNCll3seeZ-
RZ3WTTyDBsPjZ4fGLKCkcC4NbbUxj4Edawg
S6QCVtcvQ3-
fJMYhhhGX6IbOo_I6sE8FN0B_dG&media_app_id=123456&behavior_time=__EVENT_TIME__
&game_id=__GAME_ID__

2.3.4 下载#

对应搜索推荐响应中的Tracking.download_url字段。

请求方法:GET

请求示例:

https://api.ykysearch.qq.com/v1/data-
report/download?request_id=180578a2d2dfe3eb3def407257bec5b5&param=sJDmecaaL
ii_Mqee-FU2emUPuD_FA_QBX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9n1wFUxY28Ou-yoUeUCgpNCll3seeZ-
RZ3WTTyDBsPjZ4fGLKCkcC4NbbUxj4Edawg
S6QCVtcvQ3-
fJMYhhhGX6IbOo_I6sE8FN0B_dG&media_app_id=123456&behavior_time=__EVENT_TIME__
&game_id=__GAME_ID__&download_event_type=__DOWNLOAD_EVENT_TYPE__

DOWNLOAD_EVENT_TYPE该宏描述了app的下载状态,可替换的值如下:

●ad_apk_download_start:表示安装包开始下载

●ad_apk_download_pause:表示安装包暂停下载

●ad_apk_download_resume:表示安装包继续下载

●ad_apk_download_cancel:表示安装包取消下载

●ad_apk_download_complete:表示安装包完成下载

●ad_apk_download_consume:表示安装包下载耗时

●ad_apk_download_fail:表示安装包下载失败

●ad_apk_download_start_exist:表示点击广告,触发的安装包下载任务正在进行中

●ad_apk_download_start_done:表示点击广告,触发的安装包下载任务在本地已有下完的APK