Authored by 周少峰

add pinzhong analysis, update version

@@ -305,7 +305,7 @@ exports.detail = (req, res, next) => { @@ -305,7 +305,7 @@ exports.detail = (req, res, next) => {
305 commentFirstPageUrl: '?pageSize=10' 305 commentFirstPageUrl: '?pageSize=10'
306 } 306 }
307 }, { 307 }, {
308 - title: `${info.title} | YOHO!BUY有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证`, 308 + title: `${info.title} | YOHO!BUY有货`,
309 keywords: info.tag.length > 0 ? `${info.tag}` : 309 keywords: info.tag.length > 0 ? `${info.tag}` :
310 ['Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,', 310 ['Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,',
311 '黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,', 311 '黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,',
@@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test'; @@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test';
11 11
12 module.exports = { 12 module.exports = {
13 app: 'web', 13 app: 'web',
14 - appVersion: '5.7.0', // 调用api的版本 14 + appVersion: '5.7.1', // 调用api的版本
15 port: 6002, 15 port: 6002,
16 siteUrl: 'http://www.yohobuy.com', 16 siteUrl: 'http://www.yohobuy.com',
17 cookieDomain: '.yohobuy.com', 17 cookieDomain: '.yohobuy.com',
@@ -60,3 +60,19 @@ var _gaq = _gaq || []; @@ -60,3 +60,19 @@ var _gaq = _gaq || [];
60 s.parentNode.insertBefore(bp, s); 60 s.parentNode.insertBefore(bp, s);
61 })(); 61 })();
62 </script> 62 </script>
  63 +<!-- 品众统计 -->
  64 +<script type='text/javascript'>
  65 + var _fxcmd=_fxcmd||[];
  66 + _fxcmd.sid='bb3b16fa1106a6ab8619da0095755f32';
  67 + _fxcmd.trackAll=false;
  68 + // 参数配置(可选)...
  69 + // 追踪配置(可选)...
  70 + (function () {
  71 + var _pzfx=document['createElement']('script');
  72 + _pzfx.type='text/javascript';
  73 + _pzfx.async=true;
  74 + _pzfx.src='//static.w3t.cn/fx/1/1/fx.js';
  75 + var sc=document.getElementsByTagName('script')[0];
  76 + sc.parentNode.insertBefore(_pzfx,sc);
  77 + })();
  78 +</script>
1 { 1 {
2 "name": "yohobuy-node", 2 "name": "yohobuy-node",
3 - "version": "5.7.0", 3 + "version": "5.7.1",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -747,7 +747,7 @@ $('#order-submit').click(function() { @@ -747,7 +747,7 @@ $('#order-submit').click(function() {
747 url: '/cart/ensure/submit', 747 url: '/cart/ensure/submit',
748 data: order 748 data: order
749 }).then(function(data) { 749 }).then(function(data) {
750 - var rdata, subTip, 750 + var rdata, subTip, newUser,
751 tongJi = { 751 tongJi = {
752 num: 0, 752 num: 0,
753 skn: [], 753 skn: [],
@@ -815,6 +815,19 @@ $('#order-submit').click(function() { @@ -815,6 +815,19 @@ $('#order-submit').click(function() {
815 }).track('MC.ROh.yqkx8jgGASmo3McexF7XE0'); 815 }).track('MC.ROh.yqkx8jgGASmo3McexF7XE0');
816 } 816 }
817 817
  818 + // 品众统计
  819 + if (window._fxcmd) {
  820 + newUser = window.cookie('__NEW_USER') || 0;
  821 +
  822 + window._fxcmd.push(['trackOrder', {
  823 + oid: rdata.order_code,
  824 + otp: rdata.order_amount,
  825 + u_info: window.getUid(),
  826 + u_type: newUser
  827 + }, []]);
  828 + window.setCookie('__NEW_USER', 0);
  829 + }
  830 +
818 location.href = rdata.url; 831 location.href = rdata.url;
819 } 832 }
820 } else if (data.message) { 833 } else if (data.message) {
@@ -829,9 +842,8 @@ multiPackage.init(); @@ -829,9 +842,8 @@ multiPackage.init();
829 coupon.init(); 842 coupon.init();
830 yohoCoin.init(); 843 yohoCoin.init();
831 844
832 -// 删除品众统计 2017-4-24  
833 // 获取用户是否新客(品众统计)写cookie 845 // 获取用户是否新客(品众统计)写cookie
834 -// $.ajax({type: 'GET', url: '/home/newuser'}); 846 + $.ajax({type: 'GET', url: '/home/newuser'});
835 847
836 // 订单确认页默认埋点 848 // 订单确认页默认埋点
837 yas.givePoint('YB_SC_ORDER_ENSURE'); 849 yas.givePoint('YB_SC_ORDER_ENSURE');