Google Analytics通用跨域跟踪无法正常运行

时间:2015-09-11 14:32:41

标签: google-analytics cross-domain universal

我有一个网站blog.arkency.com和一个商店https://arkency.dpdcart.com/。我使用autolinker跟踪他们之间的用户。以下是它在blog.arkency.com上的配置:

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-35104719-1', 'auto', {'allowLinker': true});
  ga('require', 'linker');
  ga('linker:autoLink', ['dpdcart.com', 'rails-refactoring.com', 'bit.ly']);
  ga('send', 'pageview');

arkency.dpdcart.com

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-35104719-1', 'auto', {
  'allowLinker': true
});


ga('send', 'pageview');

我通过购买序列进行了测试:

GA中的着陆页和来源/媒体显示不正确:

landing page

因为它是我自己的网站,不应被视为推荐。

exclusion list configuration

我在进行研究时检查了对GA的HTTP请求,看起来像是这样:

Request URL:https://www.google-analytics.com/r/collect?v=1&_v=j38&a=1255711451&t=pageview&_s=1&dl=https%3A%2F%2Farkency.dpdcart.com%2F%3F_ga%3D1.79491091.621357523.1441479797&dr=http%3A%2F%2Fblog.arkency.com%2F2015%2F09%2Ftesting-race-conditions%2F&ul=en-us&de=UTF-8&dt=Home%20%7C%20Arkency&sd=24-bit&sr=1600x900&vp=834x813&je=1&fl=18.0%20r0&_u=AgAAAEABI~&jid=1715718675&cid=621357523.1441479797&tid=UA-35104719-1&_r=1&z=1162483874

Request URL:https://www.google-analytics.com/collect?v=1&_v=j38&a=2097630504&t=pageview&_s=1&dl=https%3A%2F%2Farkency.dpdcart.com%2Fcart%2Fview%3Freferer%3Dhttps%253A%252F%252Farkency.dpdcart.com%252F%26product_id%3D113689-react-js-by-example%26__dpd_cart%3De6f30ed5-9ca4-49b5-afa2-7a606ae95f91&ul=en-us&de=UTF-8&dt=View%20Cart%20%7C%20Arkency&sd=24-bit&sr=1600x900&vp=834x813&je=1&fl=18.0%20r0&_u=AACAAEABI~&jid=&cid=621357523.1441479797&tid=UA-35104719-1&z=1979770742

Request URL:https://www.google-analytics.com/collect?v=1&_v=j38&a=1952143645&t=pageview&_s=1&dl=https%3A%2F%2Farkency.dpdcart.com%2Fcart%2Fview%3F__dpd_cart%3De6f30ed5-9ca4-49b5-afa2-7a606ae95f91&ul=en-us&de=UTF-8&dt=View%20Cart%20%7C%20Arkency&sd=24-bit&sr=1600x900&vp=849x813&je=1&fl=18.0%20r0&_u=AACAAEABI~&jid=&cid=621357523.1441479797&tid=UA-35104719-1&z=1256192494

Request URL:https://www.google-analytics.com/collect?v=1&_v=j38&a=1347158491&t=pageview&_s=1&dl=https%3A%2F%2Farkency.dpdcart.com%2Fcart%2Fdeliver%3Fpurchase_id%3DXXXXXXXX%26salt%3DYYYYYYYYYYYYYYYYYYYYYY&dr=https%3A%2F%2Fwww.paypal.com%2Fpl%2Fcgi-bin%2Fwebscr%3Fcmd%3D_flow%26SESSION%3DEf-eKJ5bQypdlCxkhwHSjyO0-D6VqMIpt_fx94q7eflrZyhE3SuxdlckyuC%26dispatch%3D50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b08198d1a93361f052308ac20c1249d8113f4c&ul=en-us&de=UTF-8&dt=Your%20Purchase%20%7C%20Arkency&sd=24-bit&sr=1600x900&vp=1214x813&je=1&fl=18.0%20r0&_u=CCCAAEATI~&jid=&cid=621357523.1441479797&tid=UA-35104719-1&z=438758986

Request URL:https://www.google-analytics.com/collect?v=1&_v=j38&a=1347158491&t=transaction&cu=USD&_s=2&dl=https%3A%2F%2Farkency.dpdcart.com%2Fcart%2Fdeliver%3Fpurchase_id%3DXXXXXXXX%26salt%3DYYYYYYYYYYYYYYYYYYYYYY&dr=https%3A%2F%2Fwww.paypal.com%2Fpl%2Fcgi-bin%2Fwebscr%3Fcmd%3D_flow%26SESSION%3DEf-eKJ5bQypdlCxkhwHSjyO0-D6VqMIpt_fx94q7eflrZyhE3SuxdlckyuC%26dispatch%3D50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b08198d1a93361f052308ac20c1249d8113f4c&ul=en-us&de=UTF-8&dt=Your%20Purchase%20%7C%20Arkency&sd=24-bit&sr=1600x900&vp=1214x813&je=1&fl=18.0%20r0&_u=CCCAAEATI~&jid=&cid=621357523.1441479797&tid=UA-35104719-1&ti=XXXXXXXX&ta=Arkency&tr=1.00&ts=0.00&tt=0.00&z=1172984422

Request URL:https://www.google-analytics.com/collect?v=1&_v=j38&a=1347158491&t=item&cu=USD&_s=3&dl=https%3A%2F%2Farkency.dpdcart.com%2Fcart%2Fdeliver%3Fpurchase_id%3DXXXXXXXX%26salt%3DYYYYYYYYYYYYYYYYYYYYYY&dr=https%3A%2F%2Fwww.paypal.com%2Fpl%2Fcgi-bin%2Fwebscr%3Fcmd%3D_flow%26SESSION%3DEf-eKJ5bQypdlCxkhwHSjyO0-D6VqMIpt_fx94q7eflrZyhE3SuxdlckyuC%26dispatch%3D50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b08198d1a93361f052308ac20c1249d8113f4c&ul=en-us&de=UTF-8&dt=Your%20Purchase%20%7C%20Arkency&sd=24-bit&sr=1600x900&vp=1214x813&je=1&fl=18.0%20r0&_u=CCCAAEATI~&jid=&cid=621357523.1441479797&tid=UA-35104719-1&ti=XXXXXXXX&in=React.js%20by%20example&ic=113689&ip=49.00&iq=1&z=1870355733

正如您所看到的,第一个域和另一个域上的cid参数是相同的,因此autoLinker似乎正在运行。 但它似乎仍然开始使用新的来源/中型/目标网页进行新会话,并且电子商务结果会附加到该会话中。

我很乐意为应该改变的内容提供任何帮助,修复它以使其正常工作。

0 个答案:

没有答案