What is the GA default session timeout for Android application
Android GA documentation is bit confusing.
The Java api says default timeout is 30 seconds.
However same document says ga_sessionTimeout is 1800 which is 30 minutes.
ga_sessionTimeout(int) - time (in seconds) an app can stay in the background before a new session is started. Setting this to a negative number will result in a new session never being started. Default is 1800 seconds (30 minutes).
My actual experiment shows that this timeout is 300 seconds. Is this because some XML resource is setting this timeout.
Does anyone know what is the timeout value for session is for Android application? Unfortunately Tracker object doesn't have get method, or any other methods to figure out the value could me.
(Cross posting on stack overflow too)
Re: What is the GA default session timeout for Android application
I believe you're confusing the 30 second timeout as the standard session when actually there is a 30 seconds period that the app can stay in the BACKGROUND before if you re-open it, it will count as a new session. That means if someone uses the Google Analytics mobile app, but leaves the app but does not close it, if the person returns to the app within 30 seconds it will still count as the same session BUT if they return after 30 seconds have passed UA will record this as a new session.
The standard session for UA for both mobile and web is 30 minutes. Also bonus info, iOS pushes new hits every 2 minutes and Android only pushes new hits to the UA server every 30 minutes.
Hope this has helped!
Was my response helpful? If yes, please mark it as the ‘Best Answer.’
Re: What is the GA default session timeout for Android application[ Edited ]
September 2016 - last edited September 2016
First thanks for your reply. That kind of explains why we see huge number of sessions for our Android application,
where as iOS app even when it has X times number of installs , shows much smaller session count.
Also I thought activity autoTracking wouldn't start a new session if activity merely resumed (onResume) and would record new session if only onCreate of Application class
How is a session counted on iOS I guess applications have to do it by itself and thus GA gets true number of sessions in case iOS?
What is the GA default session timeout for Android application[ Edited ]
August 2017 - last edited August 2017
I'm confusing too. The ga_sessionTimeout and Java API setSessionTimeout has the same definition. Does that mean ga and UA session are different things? If they are the same thing, why have two default value 30 seconds and 30 minutes?