Calculating Session Days in Google Data Studio

Google's game streaming service Stadia introduced the concept of Session Days, something we can use in the digital analytics world too using Data Studio and Google Analytics 4.

What is a Session Day?

I’ve been a gamer for as long as I can remember, and a fan of Google’s Stadia service from day one (@dpezrez if you fancy a game!). Although this post is not about Stadia itself, or Google’s less-than-ideal promotion of the service, even though it it does work great assuming you have a stable internet connection. Stadia introduced this KPI called Session Days which they have started paying game publishers on.

…we’re giving 70% of monthly program revenue back to participating partners. Earnings are based on player engagement and measured by “session days”.

Session Days are defined as the number of (unique) days a player has played a game. That is, if someone plays a total of two hours across five gaming sessions, but all in one day, it’ll be counted as one Session Day.

I think this is a good metric that we can adopt in the digital analytics world. Especially in Google Analytics where we can define it as the number of days a user has visited your website or app. Then maybe, just maybe, Average Session Days could be a KPI – if it is important enough that is…

What’s wrong with Sessions?

Sessions has long been a metric that has caused much debate in the analytics industry – mainly over it’s relevance in a hyper-connected world. And something I discussed with Dara on The Measure Pod in episode #2 which you can listen to below.

The Measure Pod
The Measure Pod
Measured Opinions #2: Is the Session dead?

The takeaways from the chat for why I think Sessions is dead are:

  1. The definition is too rigid/basic. We’ve got one definition of how to assess a Session across all pages of websites and screens on apps – 30 minutes of inactivity. Yes, I know you can change these in GA, but generally, people leave defaults as is.
  2. It’s just too old fashioned, defined in the pre-smartphone and pre-mobile era. Few people nowadays sit down to have a session on a website. It’s a web-based metric defined 20 years ago that we’ve tried to keep relevant as the devices and browsing habits have changed.
  3. Browser technology has evolved and is now harder to keep cookies across the lifetime of a user. Things like Apple’s ITP setting cookie expiry to 24 hours in some instances.

This is where I believe Session Days can be more meaningful than Sessions. It gets around common issues with Sessions, such as spending more than 30 minutes on a page then triggering a new Session when going to the next page, even if the user has been constantly engaged the whole time. Or if a user opens a website on their phone with no intention of browsing then, but as a reminder of sorts so that they can browse properly later (or is that just me?).

Getting Session Days in Data Studio

As we can’t get natively in GA4 itself, Google Data Studio is the route I rent down. Of course you can use the BigQuery export and SQL to calculate it, but that’s for another time. In this example, I’ve used GA4’s Data API via the built-in Data Studio data source.

Start by connecting your GA4 property to the Data Studio report, then add in a new ‘Extract Data’ data source including:

  • Date
  • Total Users
  • Active Users (optional)
  • New Users (optional)

And set it to automatically update some time early in the morning daily.

Data Studio Extract Data source including user metrics

In my example, I have set the date range to pull in the last 90 days, but you can configure whatever range you need. I have included all three user metrics GA4 has (Total, Active and New) for comparison, but just pick total or active users is all you really need.

Note: Rename the metric(s) to use the name “Session Days” in some way at this step to save time later on when using the data in the charts.

Bear in mind that Session Days only works as an aggregated metric. For example, if you plot Session Days by date, you will get the same as plotting users by date:

Line graphs showing total users and total sessions by day - same data in both charts

Below is a few examples using variations of the Session Days metrics. For this website I am reporting on, the difference between ‘active’ and ‘total’ users was insignificant, but yours may not be.

Data Studio scorecards showing various sessions and session day metrics

Using Session Days

Now that the Extract Data data source is set up, Session Days will be available in all your charts and data controls in the dashboard. You can use this new metric(s) alongside the existing GA4 data source data – and even blend them together to plot in a single chart.

Note: The limitation of the Extract Data source will be the date range. For example, you can see below that if I specify a year on year comparison in a scorecard, It will show that there is no data as we only defined 90 days in the data source configuration:

Data Studio scorecard showing no data for last year for session days
Written by

Daniel is the innovation and training lead at Measurelab - he is an analytics trainer, co-host of The Measure Pod analytics podcast, and overall fanatic. He loves getting stuck into all things GA4, and most recently with exploring app analytics via Firebase by building his own Android apps.

Subscribe to our newsletter: