Google Analytics:跟踪链接点击所需的延迟时间? [英] Google Analytics: delay needed for tracking link clicks?

查看:216
本文介绍了Google Analytics:跟踪链接点击所需的延迟时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试跟踪网页上的各种点击事件,以了解用户如何浏览我们的网站。

We're trying to track various click events on our pages to see how users are navigating our site.

可以通过不同的链接到达给定页面(例如,通过原始页面顶部的链接与页脚中的链接)。因此,仅仅跟踪加载的目标页面是不够的;我们需要标记和跟踪点击事件。

It's possible to arrive at given page via different links (e.g. via a link in the top of the originating page vs one in the footer). For this reason it's not sufficient to merely track that the destination page loaded; we need to tag and track the click events.

Google Analytics 文档建议为出站链接的点击添加100毫秒的延迟,以便在加载链接目标之前完成跟踪代码。这是因为 _gaq.push(['_ trackEvent',category,action])代码是异步的,需要时间才能在页面卸载之前完成?

The Google Analytics documentation recommends adding a 100ms delay for clicks on "outbound links", in order for the tracking code to complete before loading the link target. Is this because the _gaq.push(['_trackEvent', category , action]) code is asynchronous, and needs time to complete before the page is unloaded?

如果是这样,现场链接也不需要这个吗?我没有看到这与链接到同一网站上的新页面有何不同;在这两种情况下都会卸载当前页面。

If so, wouldn't this also be required for "on site" links? I fail to see how this is different from a link to a new page on the same site; in both cases the current page is unloaded.

编辑:我发现了Google的 hitCallback 通过回调触发页面加载事件的机制。这样就不需要使用延迟。

Edit: I've since discovered Google's hitCallback mechanism for firing your page load events via callback. This obviates the need to use a delay.

推荐答案

在新页面之前需要进行的任何跟踪都应该包括轻微(<200ms)延迟。非现场,现场,表单提交等。这允许完成对分析服务器的请求。

Any tracking that is needing to be done just before a new page should include a slight ( < 200ms) delay. Offsite, onsite, form submit, etc. This allows the request to the analytics servers to be completed.

就内部链接跟踪而言,您是否查看过页内分析报告& 增强型链接属性插件?它可以帮助你,而不需要额外编码。

As far as internal link tracking, have you looked at the In-Page Analytics report & Enhanced Link Attribute plugin? It could help you out a bit without needing to do extra coding.

这篇关于Google Analytics:跟踪链接点击所需的延迟时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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