2

Does anyone know what formula is used for this value specifically in the context of the Google Analytics dashboard? I want to set up a load test to match this value.

enter image description here

  • Do you use any filters on your analytics view relating to your question? – Josh Salganik Mar 28 '18 at 4:18
  • There are no filters – TheEdge Mar 28 '18 at 4:33
2

I believe that the "right now" number is calculated as the number of unique users that have visited the site in the last 5 minutes.

To figure this out, I set up GA on a fresh new site where I was the only visitor. I watched the real time report as I clicked around, and then I waited until the "right now" number went back down to zero. It was five minutes.

For load testing, I recommend ignoring Google Analytics. GA doesn't include most robots nor does it tell you about image, CSS, and JS assets downloaded from your site. Those can put significant additional load onto your servers.

For load testing it is usually much better to use you access logs. Replay all the hits from your access logs during a busy period to get a much more accurate view of how your web server performs under a real load.

  • @stephen-osermiller I assume while you clicked around the active user remained at 1? Appreciate the tip re the web logs. Unfortunately at this point I don't have access and all I have to work on is "When the site is busy we see the active users in the range of ~500 to ~ 700" – TheEdge Mar 28 '18 at 11:26
  • @stephen-osermiller As most (except for some very small JS that may be page specific and not already cached by the browser) of the assets (images, css) are served off a separate machine. So at this point doing some load testing is pertinent because I am working out what the server and app can handle as the code is pretty much the bottleneck. – TheEdge Mar 28 '18 at 11:33
  • Yes, it was at 1 while I clicked around. My hits were the only ones that were visible in the real time report as I was testing. – Stephen Ostermiller Mar 28 '18 at 13:42
3

Real time is calculated by a hit, which is an interaction resulting in data being sent to Google. Each time the tracking code is triggered by a user's actions (page view, conversion, refresh, etc) Google Analytics records that activity. Each interaction is packaged into a "hit" and sent to Google's servers.

There are some caveats with Real-Time view, which in my opinion is most effective to determine if you have installed GA properly. The following can affect the number of true or live visitors:

Real-Time is not compatible with User ID enabled views If you have any filters applied to your view (it's always best to have 1 view called "unfiltered" which has no filters or modifications made to it) then it may take up to 2 hours to reflect in Real-Time

*For Mobile Apps, hits are batched to preserve mobile device battery life - thus you may notice delays. "Batching" occurs on the order of minutes, according to Google.

Lastly, what may be the most likely culprit is Campaign Attribution - according to Google:

Due to a change in the way Universal Analytics sends and stores campaign information for Real-Time reporting, it is possible that, during a single session, a user stops being recognized as coming from a specific campaign and is instead counted as a direct referral. As a result, you'll see traffic and conversions incorrectly attributed to a Source of (direct). You'll only see this in Real-Time reports; in standard reports, traffic and conversions will be attributed correctly.

Hope this helps!

  • Thanks for the info. But that does not actually tell me how it is calculated? – TheEdge Mar 28 '18 at 4:34
  • Take a look now. – Josh Salganik Mar 28 '18 at 4:41
  • Thanks that makes more sense.... And if 10 hits come from the same user then the active user is 1? How long is a user considered active since the last hit? Is there any way to work out the average concurrent users across a period of time? – TheEdge Mar 28 '18 at 4:56
  • I've read that real time reporting includes users who have visited your page 5 minutes ago. After 5 minutes they are dropped off of real time in analytics. This claim of 5 minutes comes from some reputable sources but I haven't seen anything official. – Michael d Mar 28 '18 at 6:25
  • @Michaeld I would say that Real-Time Analytics, and what it attempts to measure (as it relates to Google Analytics), would be better described as, and more concretely explained as the time frame for what constitutes literal real-time analytics. Yes, we can see the visit decay, which may go back as far as 5 minutes; However I'm suggesting that real-time analytics involves data used within no moe than one minute of it being entered into the system, hence "real-time." If after 5 minutes, a user triggers an event or page view, then another "real-time" user pops up in the dashboard. – Josh Salganik Mar 29 '18 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.