使用“Google Analytics”,使用ga.js和analytics.js跟踪我们的网站,但我不知道它们之间的区别。 除了语法之外,它们有什么区别! :d
(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');当我创建一个帐户(Google Analytics)时,它只是通过analytics.js向我提供了跟踪代码,为什么不是ga.js. analytics.js是他们推荐的还是什么!
Working on "Google Analytics", Track our website using ga.js and also analytics.js but I don't know the difference between them. Is there any difference in them except the syntax! :D
(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');And when I created an account(Google Analytics) it just gave me the tracking code by analytics.js why not ga.js. Is analytics.js is the one recommended by them or what!
最满意答案
Analytics.js是新的通用分析配置文件。 您在创建配置文件时设置经典或通用。 您无法在经典和通用之间切换配置文件,而是需要创建新配置文件以在配置文件类型之间切换。
Analytics.js is the new universal analytics profile. You set classic or universal when you create the profile. You are not able to switch a profile between classic and universal, instead you need to create a new profile to switch between profile types.
更多推荐
发布评论