首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Google通用分析-中止分析调试器中的命中错误

问Google通用分析-中止分析调试器中的命中错误
EN

Stack Overflow用户
提问于 2014-04-25 10:58:08
回答 2查看 5.6K关注 0票数 2

我的新谷歌通用分析代码给了我错误,在分析调试器添加的铬:

初始化谷歌分析。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复制的跟踪代码片段)。

代码语言:javascript
复制
<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跟踪代码是:

代码语言:javascript
复制
<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>
EN

回答 2

Stack Overflow用户

发布于 2014-04-26 00:15:44

您可以尝试从amleo.com中删除ga('create', 'UA-1-1', 'amleo.com');。不指定域名可以让您选择编写cookie的最佳域。所以,您的代码应该是:ga('create', 'UA-1-1');

票数 2
EN

Stack Overflow用户

发布于 2016-02-10 20:17:15

使用'auto‘的cookieDomain。有关更多信息,请阅读以下伟大的文章:http://www.simoahava.com/analytics/cross-domain-tracking-across-subdomains/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23291124

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档