Search code examples
iosswiftfirebasefirebase-analytics

How to change minimum session duration value in Firebase Analytics for iOS?


I'm using Firebase Analytics for my iOS app. Recently I noticed that the number of daily active users in the app significantly differs from user activity in the database. It seems that Firebase identifies a session only if it's at least 10 seconds, but most of the users open the app to check the main screen for less than 10 seconds. I'm trying to find a way to set the minimum session duration value, but can't seem to find it. Is there a way to make Firebase Analytics pick the users who have short sessions as daily active users?

Android version of the SDK has a function called setMinimumSessionDuration that allows changing the default value, but the iOS version seems to be missing it.


Solution

  • I Found a better solution

    // Sets the minimum engagement time in seconds required to start a new session
     [[FIRAnalyticsConfiguration sharedInstance] setMinimumSessionInterval: 1];
    

    P.S you need to import FIRAnalyticsConfiguration class should be accessible first.