您好,我已添加 Google 分析 帐号管理中的号码,我是否还需要在文件中添加谷歌跟踪代码以进行跟踪,在谷歌中它仍然显示
The Google Analytic tracking code has not been detected on your website's home page
请告诉我如何将 Google 分析设置到我的网站。
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'xxxxxxxx']);//fake
_gaq.push(['_setDomainName', 'fake.com']);//fake
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
我需要在文件中添加这种类型的代码吗
最佳答案
在管理员中设置帐户后,应自动输出 JS 代码。仍然没有的可能原因是:
关于magento - 设置谷歌分析magento,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14837884/