【发布时间】:2015-02-21 13:21:41
【问题描述】:
实施增强型电子商务后,我发现在 Google Analytics(分析)中显示的页面非常少,因为没有有 Analytics 代码。
在检查源代码时,那些失败的页面上的代码与正确验证的页面上的代码之间没有区别。
我安装了 GA Debug Google Chrome 扩展程序,我可以看到在几个页面上,ga("send", "pageview") 调用返回了一个错误。
但是,我在任何文档或在线任何地方都找不到描述ga("send", "pageview") 调用可能出现的错误或提供任何有助于诊断任何可能问题的信息的信息。
重要的是,页面上没有 javascript 错误,我能看到任何东西的唯一方法是使用 GA Debug 插件 - 有些人说它并不能很好地工作!尽管如此,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-500228-1', 'auto');
ga('require', 'ec'); // Load the advanced ecommerce plug-in.
ga('require', 'displayfeatures'); // Load display advertising.
ga('set', '&cu', 'GBP'); // Set currency
// Add generated analytics elements from the request container
ga('ec:addImpression', {
'id': '021109021CB'
, 'name': 'Cam shaft, Type 4 Mechanical Std. (No Cam Wheel)'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 1
, 'price': 148.75
}); ga('ec:addImpression', {
'id': '071109021CB'
, 'name': 'Cam shaft Type4 Hydraulic Std (No Cam Wheel)'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 2
, 'price': 133.92
}); ga('ec:addImpression', {
'id': '021198541'
, 'name': ' Cam bearing set, std, 1.7-2.0 [43]'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 3
, 'price': 9.93
}); ga('ec:addImpression', {
'id': '021109309G'
, 'name': 'Cam follower 1.7-2.0 Type4 engine 72-78'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 4
, 'price': 9.00
}); ga('ec:addImpression', {
'id': '022109309'
, 'name': 'Cam Follower Hydraulic Type 4/WBX & CT Engine'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 5
, 'price': 14.17
}); ga('ec:addImpression', {
'id': 'AC10920091'
, 'name': ' Lifters, Type 4 Scat Lube-a-Lobe Set of 8'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'SCAT'
, 'list': 'Product listings'
, 'position': 6
, 'price': 95.33
}); ga('ec:addImpression', {
'id': '021109301A'
, 'name': 'Pushrod, Type4 with Solid tappets, 271mm'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'VW'
, 'list': 'Product listings'
, 'position': 7
, 'price': 24.83
}); ga('ec:addImpression', {
'id': '021198335'
, 'name': 'Pushrod Tube and Seal Kit for Type 4 Engines 1700-2000'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'KITS'
, 'list': 'Product listings'
, 'position': 8
, 'price': 40.33
}); ga('ec:addImpression', {
'id': '021109335C'
, 'name': 'Push rod tube 1.7-2.0 Aircooled'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'SSP'
, 'list': 'Product listings'
, 'position': 9
, 'price': 4.92
}); ga('ec:addImpression', {
'id': '021109335CSS'
, 'name': 'Push rod tube 1.7-2.0 Aircooled Stainless Steel'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'KAEFER'
, 'list': 'Product listings'
, 'position': 10
, 'price': 8.58
}); ga('ec:addImpression', {
'id': '021109345A'
, 'name': ' Pushrod Seal, Between Tube & Case,1.7-2.0, Small [37]'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 11
, 'price': 0.42
}); ga('ec:addImpression', {
'id': '021109349B'
, 'name': ' Pushrod Seal, Tube to Head, 1.7-2.0, Large 25.1 [37]'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 12
, 'price': 0.42
}); ga('ec:addImpression', {
'id': '021109339'
, 'name': 'Retaining wire, push rods tube 1.7-2.0'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 13
, 'price': 6.42
}); ga('ec:addImpression', {
'id': '113109651A'
, 'name': 'Valve collet, all aircooled, WBX, Diesel and Golf 1100-1800'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 14
, 'price': 0.83
}); ga('ec:addImpression', {
'id': '021109641B'
, 'name': ' Retainer, valve spring, 1.7-2.0 [38]'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 15
, 'price': 3.72
}); ga('ec:addImpression', {
'id': '021109623K'
, 'name': 'Valve Spring, Type4 1.7-2.0'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 16
, 'price': 4.17
}); ga('ec:addImpression', {
'id': '021109601'
, 'name': 'Inlet valve, 1.7 & 1.8 8/74-> (39.3mm x 8mm Stem)'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'IVAM'
, 'list': 'Product listings'
, 'position': 17
, 'price': 5.42
}); ga('ec:addImpression', {
'id': '022109601'
, 'name': ' Inlet valve, 1.8, 8/73-7/74 (41x8mm) [39]'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'IVAM'
, 'list': 'Product listings'
, 'position': 18
, 'price': 8.74
}); ga('ec:addImpression', {
'id': '021109601A'
, 'name': 'Inlet valve, 2.0, 8/75-79 (37.5mm)'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'IVAM'
, 'list': 'Product listings'
, 'position': 19
, 'price': 5.83
}); ga('ec:addImpression', {
'id': '022109612D'
, 'name': 'Exhaust valve, 1.7-2.0, 33mm'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'IVAM'
, 'list': 'Product listings'
, 'position': 20
, 'price': 8.25
}); ga('ec:addImpression', {
'id': '022109612A'
, 'name': ' Exhaust valve, 1800cc, 34mm* [50]'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'IVAM'
, 'list': 'Product listings'
, 'position': 21
, 'price': 8.50
}); ga('ec:addImpression', {
'id': '021101403A'
, 'name': 'Valve Guide, Inlet, Type 4 Engine'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'IVAM'
, 'list': 'Product listings'
, 'position': 22
, 'price': 3.36
}); ga('ec:addImpression', {
'id': '021101417A'
, 'name': 'Valve guide, exhaust, 9mm'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'IVAM'
, 'list': 'Product listings'
, 'position': 23
, 'price': 3.33
}); ga('ec:addImpression', {
'id': '022109443'
, 'name': 'Rocker arm, Inlet, 2.0 Aircooled 76-83, 10mm screw'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'VW'
, 'list': 'Product listings'
, 'position': 24
, 'price': 21.00
}); ga('ec:addImpression', {
'id': '022109463'
, 'name': '**NLA** Rocker arm, Exhaust, 2.0 Aircooled 76-83, 10mm scr'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 25
, 'price': 21.00
}); ga('ec:addImpression', {
'id': 'N0110077'
, 'name': 'M7 nut for 1.7-2.0 Type4 rocker shafts'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 26
, 'price': 0.25
}); ga('ec:addImpression', {
'id': '043109451'
, 'name': 'Valve screw, Best Quality ,1.2-1.6, 8/60-, 8mm'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 27
, 'price': 1.67
}); ga('ec:addImpression', {
'id': '022109451'
, 'name': 'Adjusting screw,valve,1.8-2.0 2.1DJ,1.9DG 89-, 10mm,NOT 1.7!'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 28
, 'price': 3.33
}); ga('ec:addImpression', {
'id': 'N0111525'
, 'name': ' Nut, 8mm valve adjuster+general use [10]'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': ''
, 'list': 'Product listings'
, 'position': 29
, 'price': 0.34
}); ga('ec:addImpression', {
'id': '028109453'
, 'name': 'Nut for 10mm valve adjusting screw'
, 'category': 'Bay Bus 1968-79/Bay Bus 1968-79 Type 4 Engine Parts - 1.7, 1.8 & 2.0 litre/Valvetrain, Pushrods & Camshaft'
, 'brand': 'VW'
, 'list': 'Product listings'
, 'position': 30
, 'price': 2.08
});
ga('send', 'pageview');
这与 正常工作的许多其他页面相同,显然具有不同的产品数据 - 所以我想知道产品数据本身是否会导致问题。
我在 GA Debug 中看到的错误如下:
Error: type={0: "len", 1: 9199} method= message= account=
M.log
O
fc
pc
(anonymous function)
gc.(anonymous function).H
ad.(anonymous function).send
b.(anonymous function)
jf.R
jf.H
Z
(anonymous function)
(anonymous function)
(anonymous function)
最后三个匿名函数来自 ec.js,其余来自 analytics_debug.js。
当然,所有这一切都可能是一个红鲱鱼,因为它来自调试,而不是 GA 本身 - 但除了 Google 否认这些页面上有代码,我没有其他问题的迹象!
【问题讨论】:
-
代码示例太密集,没用。请分享一个链接到您的错误被复制的页面
-
真的吗?每当我在其中一个问题中压缩代码时,就会有人对我大喊,如果没有我正在使用的 exact 代码,我不能指望任何人进行调试!如果您将其粘贴到突出显示 javascript 的编辑器中,您应该会发现它非常易读……不过它来自的页面在这里:vwheritage.com/shop/bay-bus/type-4-engine-parts-17-18-20-litre/…
-
您链接到的页面看起来工作正常。没有错误。
-
我同意 - 没有错误...除了 Google Analytics 明确声明此页面没有 Analytics 代码 - 当我查看 Google Analytics 调试器时,我收到了上面详细说明的错误(在调试器中) ,而不是控制台)。您是否查看过启用了 Google Analytics 调试器的页面?
-
认真的吗?进入这个问题的努力得到了否决?怎么回事?我在这里需要一些帮助,而由于谷歌可笑的沉默,我无处可去。谢谢。
标签: javascript google-analytics universal-analytics