A default Analytics session expires when a user is inactive on your website for more than 30 minutes.
- At noon every day
- When a user opens another browser window
- After 30 minutes, regardless of user activity on your website
- When a user is inactive on your website for more than 30 minutes
The correct answer is: When a user is inactive on your website for more than 30 minutes
Explanation: The default analytics session expires after 30 minutes. If someone just clicks on the button at 29 minutes 59 seconds, the session will not expire. If the user clicks on the page after 30 minutes and 1 second, a new session will be recorded. Google Analytics will track it as a new visit by returning users. That’s why the user should not be inactive for more than or equal to 30 minutes if you don’t want the session to expire. You can change the default session expiration time as per your need.
Sessions and campaigns end after a specific amount of time passes. By default, sessions end after 30 minutes of inactivity and campaigns end after six months. You can change the settings so sessions and campaigns end after the specified amount of time has passed.
Read more here: https://support.google.com/analytics/answer/2795871