Reputation: 33
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.
Upvotes: 3
Views: 1249
Reputation: 855
here you can set session timeout for Firebase Analytics
Analytics.setSessionTimeoutInterval(30.0)
Upvotes: 0
Reputation: 1181
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.
Upvotes: 2
Reputation: 506
Ran into same problem. This is what i found so far. (A hackish solution)
//After calling [FIRApp configure];
[[NSNotificationCenter defaultCenter] postNotificationName:kFIRAnalyticsConfigurationSetMinimumSessionIntervalNotification
object:self
userInfo:@{kFIRAnalyticsConfigurationSetMinimumSessionIntervalNotification : @(1)}];
The above notification constant is from FIRAnalyticsConfiguration.h
You will need to import this file.
Upvotes: 1