Cross domain tracking in GA

时间:2015-06-30 13:40:12

标签: google-analytics cross-domain universal-analytics web-analytics openwebanalytics

Need a help regarding a doubt over cross domain tracking in GA.

We got three domain abc.com, pqr.com, xyz.com. For cross domain tracking I am using the below code, my questions are:

  1. In order to use same code on all three domains, I am including source domain in the line #3 of the code, instead of including only destination domains in the array as suggested by google… would it be a problem?

  2. What is difference if I am passing linker parameters in anchor portion of the URL (instead of the query portion)?

Any help would be highly appreciated. Thanks in advance

  ga('create', 'UA-xxxxxxx-x', 'auto',{'allowLinker': true});
  ga('require', 'linker');
  ga('linker:autoLink', ['abc.com','pqr.com','xyz.com'], true, true); 
  ga('require', 'displayfeatures');
  ga('send', 'pageview'); // Send page view for global tracker

1 个答案:

答案 0 :(得分:0)

  1. 包含源域不是问题,但它没有任何意义。
  2. 只有在知道原因的情况下才能这样做。例如,当您有AJAX驱动的网页(单页网站)时
  3. 无论如何,不​​要忘记从您的域名中排除推介: https://support.google.com/analytics/answer/2795830?hl=en&ref_topic=2790009