“无效的跟踪ID.失败中止."用于事件跟踪 [英] "Invalid tracking Id. Aborting hit." for Event Tracking

查看:108
本文介绍了“无效的跟踪ID.失败中止."用于事件跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Shopify上托管了两个电子商务网站,并且在这两个网站上都正确实施了Google Analytics(分析).我每天检查我的分析数据,一切都很好.最近,我一直在尝试每次有人添加事件跟踪产品放入购物车.

I have 2 ecommerce sites hosted on Shopify and Google Analytics properly implemented on both sites. I check my analytics daily, all that's good. Recently, I've been trying to do event tracking every time someone adds a product to their shopping cart.

紧随本教程.

因此,我在添加到购物车"按钮中添加了以下内容:onclick ="_ gaq.push(['_ trackEvent','Products','Add to Cart','some-product-title']);".这在我的第一个电子商务网站上运行良好,我在Google Analytics(分析)中看到了该事件.

So I added the following to my add to cart buttons: onclick="_gaq.push(['_trackEvent', 'Products', 'Add To Cart', 'some-product-title']);" . This is working perfectly on my first ecommerce site, I see the event being tracked in Google Analytics.

但是,在我的第二个站点上,它没有通过,并且出现错误...使用

On my second site however, it's not going through and I'm getting an error... using the GA Debugger, I tried doing that event tracking command in the console: _gaq.push(['_trackEvent', 'Products', 'Add To Cart', 'some-product-title'])

我收到以下错误:无效的跟踪ID.中止打击.

I get the following error: Invalid tracking Id. Aborting hit.

这是什么意思?试图弄清楚如何在两个站点上以不同的方式实施Google Analytics(分析),但无法弄清楚.谢谢

What does this mean? Trying to figure out how GA is being implemented differently on both sites, but can't figure it out. Thanks

推荐答案

也许您的新站点正在使用事件语法到:

Perhaps your new site is using Universal Analytics (analytics.js)? If that is the case, you'll have to update your event syntax to:

ga('send', 'event', 'Products', 'Add To Cart', 'some-product-title');

这篇关于“无效的跟踪ID.失败中止."用于事件跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆