Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Google Analytics Real Time work?

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.com/analytics/realtime/bind Does anybody know the trick? It works flawless...

like image 893
Alexandre Avatar asked Nov 30 '11 18:11

Alexandre


People also ask

Is Google Analytics real time accurate?

Google Analytics is a reliable tool that gives accurate results in most cases. However, it's not 100% accurate because of some glitches and problems.

How long does it take for Google Analytics to show real time data?

Many of your reports and explorations can take 24-48 hours to process data from your website or app. You can use the Realtime and DebugView reports to confirm that you're collecting data from your website or app successfully.

Why is Google Analytics not showing real time data?

If you are noticing that there is no data in the real time reports, check if it is a user ID enabled view. Step-1: Log in to your Google Analytics account. Step-2: Click on the 'Admin' section on the left-hand panel. Step-3: Under 'View settings', check if the 'User- ID reports' are enabled or disabled.

Is GA real time?

The reports are updated in real time and every hit to Google Analytics servers gets monitored here. In simple terms, this report basically shows you how many users are currently accessing your website, which pages are they interacting with, and whether they completed any goals that you have setup, etc.


2 Answers

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.

like image 167
Yahel Avatar answered Oct 03 '22 00:10

Yahel


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

like image 29
Ben McCann Avatar answered Oct 03 '22 01:10

Ben McCann