Session expires when a user remains inactive on a web page for over 30 minutes.
Default timeout settings in Google Analytics are available for sessions and campaigns. It means that after a specific period, sessions and campaigns automatically end. For sessions, the default parameter is 30 minutes, whereas campaigns end after six months of inactivity. You can customize these settings to end sessions and campaigns after the specified time automatically.
To decide what settings are best for your website, analyze customer behavior and your website characteristics. For example, if your web resource automatically signs out users after 15 minutes, session timeout should match this time. On the other hand, if you publish a lot of content and expect users to spend some time reading, it’s better to lengthen the session time. And, vice versa, if you don’t have much content, you can reduce session time.
Note that sessions cannot be shorter than one minute and longer than four hours. In addition, campaigns timeout cannot exceed two years.
When does a default analytics session expire? – https://support.google.com/