Retention and Daily Active Users Explained.
By: Mike Shakhomirov
Tags: Visualization, Firebase, Data Studio, Google Big Query, Google Analytics

To count active users per day in BigQuery you can use this SQL below. A bit ugly but something like this should work:

User retention table

For many marketers the metric that represents the most interest would be 30 day retention because if a user was active on day 30 that means it has been using an App for 30 days. If a user was active at least once during the last 30 days it makes that user a monthly active one (MAU).

However, it’s not necessarily true that this user is an active one.

We need to distinguish between measurable user activity (e.g. K-means clustering of your user base) and simply being active as MAU.

For example, if a user opened your App and then uninstalled it — is it an active user? Yes, it is.

In this article I will be talking about counting user logons and producing DAU/MAU metrics.

New active users are the users that, in a specified period, interact with your app for the first time. (eg. created an account) and then start using it daily, weekly or monthly. These users are often heavily influenced by the user onboarding process they experience.

Returning active users are the users that keep coming back to your app after the period of inactivity and are closely related to the retention and recurring revenue metrics of your business.

Now let’s create a new data source and visualize our numbers in Data Studio.

We don’t really need to use aggregation in SQL and materialize it because our dataset is relatively small and Data Studio can do aggregation for us.

Datasource:

You can see that I created a new field called user_pseudo_id_percent . We will use it to show the percentage of retained users later.

Now let’s add a new column week_ which we will use to calculate retention per week. Try running this bit of SQL and see what happens:

select ceil(DATE_DIFF('2020-10-25', '2020-10-10', DAY)/7) AS week_diff

week_diff

For example, in Firebase we have a similar thing called Weekly retention cohorts.

Firebase new user retention example (image by author)

Let’s add this new field to our datasource:

Adding weekly cohorts to retention

To accurately report on retention, your analytics tool needs to be able to recognize the same user even if they log in six months later using a different browser or device. This might become a real challenge because

… in real life it becomes way more complicated when users have different accounts and multiple devices.

What is an “Active user”

Let’s assume every client Application will log in several times a day when running. Each logon event can be recorded to your Data lake/Data warehouse along with the user id and the device id.

This is pretty much how Firebase logs users. You will have user_pseudo_id by default and user_id can be enabled like so:

There is a lot of things you can do to listen in on those events and even pre-process them to just the data you need before sending them to the Data warehouse. Things like Kinesis or Kafka can easily stream event data from your microservices.

— So what is an active user? — It depends on the business logic you want to apply to your datasets and reports.

Active users are often reported as Monthly active users (MAU), Weekly (WAU), and Daily (DAU). Let’s illustrate active users a little bit more with a visual example: