Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
physical
Commits
8a2be6a8
Commit
8a2be6a8
authored
Sep 09, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点击push埋点兼容
parent
7d96f216
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
collect_data.py
linucb/views/collect_data.py
+10
-4
No files found.
linucb/views/collect_data.py
View file @
8a2be6a8
...
@@ -333,12 +333,18 @@ class CollectData(object):
...
@@ -333,12 +333,18 @@ class CollectData(object):
# 用户点击个性化push进linucb
# 用户点击个性化push进linucb
elif
"type"
in
raw_val_dict
and
raw_val_dict
[
"type"
]
==
"on_click_push"
:
elif
"type"
in
raw_val_dict
and
raw_val_dict
[
"type"
]
==
"on_click_push"
:
# 后端已过滤,该tag_ids是帖子/榜单的编辑标签
# 后端已过滤,该tag_ids是帖子/榜单的编辑标签
if
isinstance
(
raw_val_dict
[
"params"
][
"tag_ids"
],
str
):
if
"tag_ids"
in
raw_val_dict
[
"params"
]:
tagid_list
=
json
.
loads
(
raw_val_dict
[
"params"
][
"tag_ids"
])
tag_ids
=
raw_val_dict
[
"params"
][
"tag_ids"
]
elif
isinstance
(
raw_val_dict
[
"params"
][
"tag_ids"
],
list
):
else
:
tagid_list
=
raw_val_dict
[
"params"
][
"tag_ids"
]
# 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
:
else
:
tagid_list
=
list
()
tagid_list
=
list
()
device_id
=
raw_val_dict
[
"device"
][
"device_id"
]
device_id
=
raw_val_dict
[
"device"
][
"device_id"
]
user_id
=
raw_val_dict
[
"user_id"
]
if
"user_id"
in
raw_val_dict
else
None
user_id
=
raw_val_dict
[
"user_id"
]
if
"user_id"
in
raw_val_dict
else
None
if
len
(
tagid_list
)
>
0
:
if
len
(
tagid_list
)
>
0
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment