Showing
2 changed files
with
22 additions
and
10 deletions
@@ -195,14 +195,14 @@ $.extend({ | @@ -195,14 +195,14 @@ $.extend({ | ||
195 | }); | 195 | }); |
196 | }()); | 196 | }()); |
197 | 197 | ||
198 | -//为您优选埋点 http://redmine.yoho.cn/issues/10117 | ||
199 | -function givePoint(parameter) { | 198 | +// 添加埋点 |
199 | +function addPoint(operate, parameter) { | ||
200 | var CID = 1; | 200 | var CID = 1; |
201 | 201 | ||
202 | - if (!window._yas || !window._yas.sendCustomInfo) { | 202 | + if (!window._yas || !window._yas.sendCustomInfo || !operate) { |
203 | return false; | 203 | return false; |
204 | } | 204 | } |
205 | - | 205 | + |
206 | //男:1,女:2,潮童:3,创意生活:4 | 206 | //男:1,女:2,潮童:3,创意生活:4 |
207 | switch(cookie('_Channel')) { | 207 | switch(cookie('_Channel')) { |
208 | case 'boys': | 208 | case 'boys': |
@@ -218,6 +218,18 @@ function givePoint(parameter) { | @@ -218,6 +218,18 @@ function givePoint(parameter) { | ||
218 | CID = 4; | 218 | CID = 4; |
219 | break; | 219 | break; |
220 | } | 220 | } |
221 | + | ||
222 | + parameter = $.extend({'C_ID': CID,}, parameter); | ||
223 | + | ||
224 | + window._yas.sendCustomInfo({ | ||
225 | + 'op': operate, | ||
226 | + 'uid': getUid(), | ||
227 | + 'param': JSON.stringify(parameter) | ||
228 | + }, true); | ||
229 | +} | ||
230 | + | ||
231 | +//为您优选埋点 http://redmine.yoho.cn/issues/10117 | ||
232 | +function givePoint(parameter) { | ||
221 | 233 | ||
222 | parameter = $.extend({ | 234 | parameter = $.extend({ |
223 | 'REC_POSE': '', | 235 | 'REC_POSE': '', |
@@ -233,11 +245,7 @@ function givePoint(parameter) { | @@ -233,11 +245,7 @@ function givePoint(parameter) { | ||
233 | return true; | 245 | return true; |
234 | } | 246 | } |
235 | 247 | ||
236 | - window._yas.sendCustomInfo({ | ||
237 | - 'op': 'YB_CHOOSE_FOR_YOU_Y', | ||
238 | - 'uid': getUid(), | ||
239 | - 'param': JSON.stringify(parameter) | ||
240 | - }, true); | 248 | + addPoint('YB_CHOOSE_FOR_YOU_Y', parameter); |
241 | } | 249 | } |
242 | 250 | ||
243 | window.cookie = cookie; | 251 | window.cookie = cookie; |
@@ -255,3 +263,4 @@ window.getShoppingKey = getShoppingKey; | @@ -255,3 +263,4 @@ window.getShoppingKey = getShoppingKey; | ||
255 | window.queryString = queryString; | 263 | window.queryString = queryString; |
256 | 264 | ||
257 | window.givePoint = givePoint; | 265 | window.givePoint = givePoint; |
266 | +window.addPoint = addPoint; |
-
Please register or login to post a comment