A Google Analytics session typically stays for 30 minutes before automatically logging out, if the user has not done any activity on it in the past minute. However, there could be more reasons behind automatic logout of analytics sessions that you can read about in the above blog.