最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How does Google Analytics Real Time work? - Stack Overflow

programmeradmin1浏览0评论

I'm wondering how Google Analytics Real Time user interface works, what's the technique ? Do they use long-polling from the client to keep the UI statistics instantly up to date by delivering realtime information from the server to the client? I just open Chrome dev tool on network tab and there is a infinite request on Does anybody know the trick? It works flawless...

I'm wondering how Google Analytics Real Time user interface works, what's the technique ? Do they use long-polling from the client to keep the UI statistics instantly up to date by delivering realtime information from the server to the client? I just open Chrome dev tool on network tab and there is a infinite request on https://www.google./analytics/realtime/bind Does anybody know the trick? It works flawless...

Share Improve this question edited Jul 29, 2013 at 16:13 Jo Liss 33.2k24 gold badges130 silver badges179 bronze badges asked Nov 30, 2011 at 18:12 AlexandreAlexandre 7,2326 gold badges59 silver badges74 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

The below refers to how the real time data is collected, not how the UI updates. (It looks like the UI is just using AJAX polling on the client-side, though)

No special polling or client-side technique is used. Data collection is the same as it always has been.

Instead, Google Analytics will assume that someone who's triggered a pageview in the last 5 minutes is still an "active" visitor.

From e-nor:

These visitors have been active in the last 5 minutes, any one not active for over 5 minutes is dropped.

I was one of two people who built the first version of the Realtime Analytics UI. We used Closure's BrowserChannel.

发布评论

评论列表(0)

  1. 暂无评论