Google Analytics网页浏览量跟踪无效

时间:2016-03-04 06:53:45

标签: google-analytics

(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', 'Tracking ID', 'Domain');  // Replace with your property ID.

ga('send', 'pageview','URL');

1 个答案:

答案 0 :(得分:0)

你的问题就在这一行:

ga('create', 'Tracking ID', 'Domain');  // Replace with your property ID.

它应该包含您的GA属性ID,它将以UA开头。像这样:

ga('create', 'UA-12345678-1', 'auto');  // Replace with your property ID.

您可以在Google Analytics的“主页”部分下找到该媒体资源ID。或者,请查看Admin-> Property->跟踪信息跟踪代码。

相关问题