Showing
2 changed files
with
20 additions
and
8 deletions
@@ -195,11 +195,11 @@ $.extend({ | @@ -195,11 +195,11 @@ $.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 | ||
@@ -219,6 +219,18 @@ function givePoint(parameter) { | @@ -219,6 +219,18 @@ function givePoint(parameter) { | ||
219 | break; | 219 | break; |
220 | } | 220 | } |
221 | 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) { | ||
233 | + | ||
222 | parameter = $.extend({ | 234 | parameter = $.extend({ |
223 | 'REC_POSE': '', | 235 | 'REC_POSE': '', |
224 | 'REC_ID': RECID, | 236 | 'REC_ID': RECID, |
@@ -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