How to Calculate Concurrent Users with Google Analytics Data?

How to Calculate Concurrent Users with Google Analytics?

With the help of Google Analytics concurrent users can be calculated for any given time. You can use the below-mentioned formula to calculate concurrent visitors. 

Concurrent Users = 'Hourly Sessions X Average Session Duration (in secs) / 3600

Where to Get Data From in Google Analytics?

You can calculate concurrent users from Google Analytics account.

  • Login to Google Analytics account.
  • Click the “Reporting” tab.
  • Select “Audience” from the sidebar menu.
  • Click “Overview”.
  • Set the time period for which you want the data.

After you have the data, you need to design a load test.

Must Read: What is Load testing? (An ultimate guide)

Design a Load Test

  1. Check your site during peak hours of traffic in Google Analytics
  2. Figure out how many sessions are there
  3. Perform a test that generates a similar amount of load/traffic.

Note: While performing a load test, add some margins too just to ensure your servers can handle higher traffic levels too.

Why find peak traffic and not just average?

Mostly, the average traffic will be low. Sites usually have regular, recurring peak periods where they experience 2x or more the average traffic levels.

Therefore, it is important to test for that peak traffic.

Reasons for extreme traffic peaks

  • There are some sites that have occasional extreme traffic peaks probably due to the nature of the site. For instance, a site declaring the result of XII class or a site selling concert tickets released at a certain date and time.  
  • User behaviour can also impact the spikes. For example, you have a breakfast recipe site. This means most of the visitors will come to your site just before breakfast. There are possibilities that your site can have peaks much higher than 10x against the average for the site. Therefore, it becomes very important to load test at traffic levels way beyond the averages to ensure your servers don’t end up burning.

You May Also Like: Google Alternative Search Engines to Use

Analyze the data

Here’s an example from one of our client’s data.

load-test

The site averaged 31.815 concurrent sessions for the entire month.

  • 1889337 monthly sessions X 38 seconds per session / 3600 = 19943.001
  • 19943.001 / 720 (30 days in June X 24h per day = 720) = 27.698 average concurrent users in June

However, if you calculate the average concurrent sessions for just Jun 29, you will get 31.815 – which is more than the average concurrent users.

load-test

Also, if you calculate the average concurrent sessions between 8 PM and 9 PM on that day when there are more users, the average concurrent sessions are 41.4808.

This is almost 2x than the monthly average concurrent users.

Key takeaways

  • While designing your load test, look at the right numbers and right time frames.
  • Even if you don’t have an exceptional spike just like above, there are chances that you will still see temporary peaks. Therefore, spike tests are always a good idea before you start funding, roll out new features or just need to be prepared.

You May Also Like: How to Add Google analytics to Magento 2 stores 

Bonus Tip: If you are stuck on performance and load tests, there’s a high chance we have worked in a similar situation before.

If you stuck at any step in calculating concurrent users, leave the query in the comments.

Latest Magento Tips, Guides, & News

Stay updated with new stuff in the Magento ecosystem including exclusive deals, how-to articles, new modules, and more. 100% Magento Goodness, a promise!

5 thoughts on “How to Calculate Concurrent Users with Google Analytics Data?”

  1. Why we are using avg. session duration in the formula, and what is function of it?

    How did you get? – The site averaged 31.815 concurrent sessions for the entire month.

  2. Where does the 3600 come from.

    I have daily max users as 50000. and average 180 seconds per session.

    how do i turn that into concurrent?

    1. You have 50,000 daily max users. On average, you are getting 2083 users per hour. Average session duration is 180 seconds. 3600 is number of seconds in an hour.

      So, as per the formula: 2083 * 180 / 3600 = 104.15 concurrent users.

  3. I can’t find a way to get session count for active hours. For example, 6am to 10pm. Any ideas? The downtime of the middle of the night really skews any kind of realistic estimate of concurrent users.

    Analytics really needs a “Max realtime sessions” report on an hourly basis.

    1. Hi Larry,
      There’s no quick way to do it but there’s a google analytics addon for google sheets. You can easily generate a report and get the data you want.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top

We can help you. Right now.

Fast growing merchants depend ServerGuy for high-performance hosting. Experience counts. Let's get started.

Talk to a sales representative

USA / Worldwide

+1.714.2425683

India

+91.9852704704

Core Web Vitals Book COver

Is your website ready for Core Web Vitals?

Take this FREE book with you and optimize your store for speed.

Learn all about new Google new ranking factors and get that top ranking.