我的新谷歌通用分析代码给了我错误,在分析调试器添加的铬:
初始化谷歌分析。analytics_debug.js:9 注册新插件:ga(提供,“链接器”,功能) analytics_debug.js:9 注册新插件:ga(提供,“显示功能”,功能) analytics_debug.js:9 运行命令: ga(create,UA-1,amleo.com) analytics_debug.js:9 创建新的跟踪器: t0 analytics_debug.js:9 新来访者。生成新的clientId analytics_debug.js:9 运行命令:ga(发送,页面查看) analytics_debug.js:9 没有储藏室。中止命中。analytics_debug.js:9 执行命令。analytics_debug.js:9 运行命令:ga(发送,事件,rfk,rfk_1,rfk_1,rg_1,rw_1,) analytics_debug.js:9 没有储藏室。中止命中。
在Google标签助手的铬外接,它说“关键错误”,错误读:
错误:没有检测到HTTP响应
我所有页面上的正常跟踪代码是:(我缩小了直接从google复制的跟踪代码片段)。
<script>(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-1-1', 'amleo.com');ga('send', 'pageview');</script>我的eCommerce跟踪代码是:
<script>
(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--1', 'amleo.com');ga('send', 'pageview');
//Include the ecommerce plugin
ga('require', 'ecommerce', 'ecommerce.js');
//Initialize the transaction
ga('ecommerce:addTransaction', {
'id': 'WEBA001399736',// order ID - required
'affiliation': 'A.M. Leonard',// affiliation or store name
'revenue': '19.99',// total - required
'shipping': '9.99',// shipping
'tax': '2.10',// tax
});
ga('ecommerce:addItem', {
'id': 'WEBA001399736',// order ID - necessary to associate item with transaction
'name': 'Leonard+ArborRain+Tower+-+Plant+%26+Tree+Hydrator',// product name
'sku': 'ART20',// SKU/code - required
'category': '',// category or variation
'price': '19.99',// unit price - required
'quantity': '1'// quantity - required
});
ga('ecommerce:send');//submits transaction to the analytics servers
</script>发布于 2014-04-26 00:15:44
您可以尝试从amleo.com中删除ga('create', 'UA-1-1', 'amleo.com');。不指定域名可以让您选择编写cookie的最佳域。所以,您的代码应该是:ga('create', 'UA-1-1');
发布于 2016-02-10 20:17:15
使用'auto‘的cookieDomain。有关更多信息,请阅读以下伟大的文章:http://www.simoahava.com/analytics/cross-domain-tracking-across-subdomains/
https://stackoverflow.com/questions/23291124
复制相似问题