session duration more than the default (30 minutes

2019-07-28 20:26发布

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 Regards

1条回答
兄弟一词,经得起流年.
2楼-- · 2019-07-28 21:02

Main Points

  • 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.
  • Inactive time in the app is counted, but only under specific conditions
  • Understanding how Google defines when an app is inactive really helps

In-Depth

Inactivity is any period in the app session when the user is not interacting with it, and the session timeout has not yet been met. It does not matter if the app is backgrounded or foregrounded while the user is inactive. In other words, If you have the app backgrounded, or are simply sitting idle on an app page, you would be considered inactive in both scenarios.

Session Timeout is not actually a setting, but rather a variable 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.

查看更多
登录 后发表回答