在2个doomens中使用相同的命名跟踪器



在一个网站和另一个域上的购物车之间实现谷歌分析跨域跟踪。在WordPress网站上,保留了原始的个人资料id,以保持唯一域报告的连续性:

WordPress网站

 var _gaq = _gaq || [];
  _gaq.push(['o._setAccount', 'UA-xxxxxxxx-4']);
  _gaq.push(['o._trackPageview']);
  _gaq.push(['xd._setAccount', 'UA-yyyyyyy-1']);
  // other cross-domain parameters are set here... 
  _gaq.push(['xd._trackPageview']);

在购物车网站上,我需要使用相同名称的跟踪器来保持cookie的正确性吗?也就是说,我需要在第二个站点上进行吗

购物车域

_gaq.push(['xd._setAccount', 'UA-yyyyyyy-1']);
_gaq.push(['xd._trackPageview']);

或者它可以保持默认:

  _gaq.push(['_setAccount', 'UA-yyyyyyy-1']);
  _gaq.push(['_trackPageview']);

每种情况的效果如何?

您不需要,但如果您这样做,无论哪种方式都可以。

最新更新