Commit 8a2be6a8 authored by 高雅喆's avatar 高雅喆

点击push埋点兼容

parent 7d96f216
......@@ -333,12 +333,18 @@ class CollectData(object):
# 用户点击个性化push进linucb
elif "type" in raw_val_dict and raw_val_dict["type"] == "on_click_push":
# 后端已过滤,该tag_ids是帖子/榜单的编辑标签
if isinstance(raw_val_dict["params"]["tag_ids"], str):
tagid_list = json.loads(raw_val_dict["params"]["tag_ids"])
elif isinstance(raw_val_dict["params"]["tag_ids"], list):
tagid_list = raw_val_dict["params"]["tag_ids"]
if "tag_ids" in raw_val_dict["params"]:
tag_ids = raw_val_dict["params"]["tag_ids"]
else:
# todo 客户端埋点bug,后期移除
tag_ids = raw_val_dict["params"]["tag_ids:"]
if isinstance(tag_ids, str):
tagid_list = json.loads(tag_ids)
elif isinstance(tag_ids, list):
tagid_list = tag_ids
else:
tagid_list = list()
device_id = raw_val_dict["device"]["device_id"]
user_id = raw_val_dict["user_id"] if "user_id" in raw_val_dict else None
if len(tagid_list) > 0:
......
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