Session counting explained


Counting sessions matters

The number of sessions performed by users is an important KPI. It affects aggregate data, retention, and Cohort reports and also activity KPIs such as DAU and MAU. 

Sessions count also affects the number and rate of loyal users, which by default are registered as such after performing three sessions following the initial install.

Session counts of organic and non-organic users can be retrieved by using Cohorts. In the Overview dashboard, the sessions data of organic installs is shown as N/A and is not available.   

When does AppsFlyer increment the number of sessions?

  • Every time the SDK is launched
    If an app is launched from scratch or if it comes back to the device’s foreground from the background - the session number increases.
  • By an SDK API request
    Some apps need session data to increase on demand.

Apps that constantly work in the background may require some other logic for counting sessions. These mainly include utility apps like battery savers, launchers, screen locks, and anti-virus apps. 

App owners of these apps may want to increase the number of sessions once a day at midnight or at some other periodic interval. In other cases, they may want to increase the number of sessions when users perform some in-app action, such as pressing the "clear memory" button and so on.

Fortunately, it's possible to actively increase the number of sessions per device.
AppsFlyer's Android SDK has an optional API for doing just that called reportTrackSession.

public void reportTrackSession(Context context);

Currently, the iOS SDK doesn’t have the same capability, as the distribution of utility apps on iOS is a lot less significant compared with Android.

Setting minimum time between sessions

Another session related SDK API enables setting the minimum time, that can lapse between two app launches, for them to be counted separately.

The API is called setMinTimeBetweenSessions (Android, iOS).

By default, AppsFlyer enforces a five-second rule, i.e. at least 5 seconds must elapse between 2 app launches to count as separate 2 sessions. The API allows setting the minimum required time between sessions.

Possible uses


  • Fighting Fraud - fraudsters have learned over time that launching apps several times is indicative of real users, and started using this to their advantage. Setting the minimum time between sessions to 60 seconds or more can help with fighting fraudsters, as it takes them much longer to fake separate sessions.
  • Consolidating sessions - sometimes users are forced to stop using your app for a short while, e.g. getting a short phone call in the middle of a game. In this case, since the app comes back from the background, a new session is counted. The app owner may wish to treat these two sessions as a single session. Setting the minimum time between sessions to 90 seconds or more can consolidate these double sessions to single sessions.

Background and app closing scenarios

The minimum time between sessions only prevents session counting when the app is active or in the background, but not if it's inactive (e.g., closed by the user). In other words, AppsFlyer always records cold-launches as sessions, regardless of the minimum time between sessions. 

For example, the Minimum time between sessions is set to 10 minutes.

  1. 0:00 User makes a cold launch - 1 session counted
  2. 0:02 User focuses on another app and comes back to the app - no new session count
  3. 0:05 User focuses on another app, closes the original app, and cold-launches it again - 1 more session counted
Was this article helpful?