Google Analytics _trackPageview AJAX 请求 100% 跳出率
我有一个通过 ajax 加载的表单(由几个阶段组成),当我在阶段之间移动时,我想在 Google Analytics 中将其作为 PageView 进行跟踪。我的工作正常,但总体跳出率低于 100% (~30%),这很好。但当我查看各个页面时,它们的跳出率似乎都是 100%。我不太确定这是否正常,或者我应该期待不同的跳出率吗?我在下面包含了一些片段。
谢谢安迪
//Run at the start
_gat._createTracker('UA-xxxxxxxx-4', 'myTracker');
var _gaq = _gaq || [];
_gaq.push(['myTracker._setAccount', 'UA-xxxxxxxx-4']);
_gaq.push(['myTracker._setDomainName', 'www.testaccount.co.uk']);
//This is run when a stage loads up.
_gaq.push(['myTracker._trackPageview', '/form/stage[X]/']);
//This code is run within each stage to capture elements of the form being completed
_gaq.push(['myTracker._trackEvent', 'Test', "value"]);
I have a form (made up of a few stages) that is loaded via ajax, and as I move between stages I want to track it in Google Analytics as a PageView. I have this working ok, but I am getting an overall bounce rate below 100% (~30%), which is fine. But when I look at the individual pages, they all seem to have a bounce rate of 100%. I am not too sure if this is normal, or should I expect different bounce rates? I have included some snippets below.
Thanks
Andy
//Run at the start
_gat._createTracker('UA-xxxxxxxx-4', 'myTracker');
var _gaq = _gaq || [];
_gaq.push(['myTracker._setAccount', 'UA-xxxxxxxx-4']);
_gaq.push(['myTracker._setDomainName', 'www.testaccount.co.uk']);
//This is run when a stage loads up.
_gaq.push(['myTracker._trackPageview', '/form/stage[X]/']);
//This code is run within each stage to capture elements of the form being completed
_gaq.push(['myTracker._trackEvent', 'Test', "value"]);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您所看到的跳出率问题通常是 cookie 域问题造成的。如果您尝试隔离顶级 www 域,我会尝试传递“none”作为 _setDomainName 的参数。 “trackPageview”既创建又读取 cookie,因此我猜测它会在您的网站上创建重复的“_utm”cookie 集。
请查看“_setDomainName”的文档,特别是有关隔离顶级域的部分,网址为:http://code.google.com/apis/analytics/docs/gaJS/gaJSApiDomainDirectory.html#_gat.GA_Tracker_._setDomainName
Bounce rate issues like the one you are seeing are typically the result of cookie-domain issues. If you're trying to isolate the top-level www domain, I would try passing 'none' as the argument for _setDomainName. 'trackPageview' both creates and reads cookies, so I'm guessing it's creating duplicate sets of '_utm' cookies on your site.
Check out the documentation for '_setDomainName', specifically the section on isolating top-level domains, at: http://code.google.com/apis/analytics/docs/gaJS/gaJSApiDomainDirectory.html#_gat.GA_Tracker_._setDomainName