页内分析需要ga.js而不是analytics.js

时间:2014-03-10 10:42:59

标签: google-analytics

最近我添加了ga('要求',' linkid',' linkid.js'); 在我的分析代码中。

这是我的源代码。

 (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-24190***-7', 'whitebeartest.com');
  ga('require', 'linkid', 'linkid.js');
  ga('send', 'pageview');

但是当我尝试使用页内分析时,它需要ga.js

我认为ga.js是analytics.js的向下兼容

如何使用页内分析?

We've identified problems in your setup. These may cause problems loading In-Page Analytics.
Your site doesn't load ga.js from Google. If you host the Google tracking code on your own servers, it isn't updated automatically and can miss important changes.
We didn't find a tracking snippet on your site. In-Page Analytics cannot load. Please make sure you have tracking installed correctly. If your snippet is included in a separate JavaScript file, you'll have to manually check it is being loaded correctly.

1 个答案:

答案 0 :(得分:0)

你让我难倒这里有我的想法:

  1. 您是否记得在属性设置中启用增强型链接归因? Enhanced Link Attribution

  2. 检查您网站上的源代码是否运行了经典跟踪代码和通用跟踪代码,您是否在某个地方放错了.push

  3. 您的帐户是否仍设置为经典分析,现在您是否尝试使用通用分析跟踪代码? ga.js是经典分析,analytics.js是通用分析。 Universal Analytics Upgrade Center