In my google analytics the session time is set to 30 minutes. but the avg. session duration that I see in my report tables is more than 30 minutes in some cases. How can it be possible?I am so confused.please please help me.
thanks a million RegardsAnswer1:
<ul><li>This is possible because each time there is activity (event or screen view) in your app, the session timeout timer is reset to the full duration.</li> <li><em>Inactive</em> time in the app <strong>is counted</strong>, but only under specific conditions</li> <li>Understanding how Google defines when an app is <em>inactive</em> really helps</li> </ul><h2>In-Depth</h2>
<em>Inactivity</em> is any period in the app session when the user is not interacting with it, <strong>and</strong> the session timeout has not yet been met. <em>It does not matter if the app is backgrounded or foregrounded while the user is inactive.</em> In other words, If you have the app backgrounded, or are simply sitting idle on an app page, <strong>you would be considered inactive in both scenarios</strong>.
Session Timeout <em>is not actually a setting, but rather a <strong>variable</strong></em> that is used to calculate the session length.
session timer = 0 minutes user launches app (session timer starts) while countdown is not 0 (starting from timeout setting) if user triggered event OR viewed screen add inactivity time to session time restart countdown else continue with countdown
Pardon the crudely-written pseudocode, but the point is, time spent in background is only counted if there is some activity in the app that occurs before the session timeout is met.
Unfortunately, I don't have any documentation to support this (as it doesn't exist, which is why I am taking the time to write this). However, I have tested this on both iOS and Android using the official Google Analytics SDK and this is indeed how it works. I can discuss the test with you if need be.