5

I'm storing my own copy of Google Analytics session data and I'm trying to figure out their schema.

I'm trying to figure out why does Google Analytics end sessions at midnight?

2 Answers 2

4
+25

Midnight is the logic time to end a session - if there has to be a specific time at which each and every session, no matter how long it is open has to be ended.

Even if it might seem stupid to count two sessions for a user visiting from 11:55pm - and leaving after 10 minutes. You might want to count visits per day/week/month/year. An in this case there has to be some kond of delimiter. As each day/week/month/year ends/begins at midnight, this is the right time to end one session amn start a new one.

Instead of the 10 minutes example, take a 10 hours session. Wouldn't you want to have a 5 hours session on, let's say march 31 and 1st of april, instead of 10 hours on the march 31?

1
  • 2
    "until there's 30 minutes of inactivity" If someone is actively doing stuff the session should not end
    – Pit
    Apr 19, 2016 at 12:42
1

From Google Analytics Help : How a session is defined in Analytics https://support.google.com/analytics/answer/2731565?hl=en

End of day expiry

Bob opens your website at 11:50 PM on the 14th of August and leaves your website at 12:10 AM on the 15th of August.

The first session ends at 11:59:59 PM on the 14th of August, and the second session begins at 12:00 AM on the 15th of August.

End of day is determined by your view timezone settings.

3
  • 3
    Yes but why did they build it like this? Mar 9, 2016 at 19:52
  • you voted this down because google made it this way? what's wrong with you?
    – Josip Ivic
    Apr 13, 2016 at 11:49
  • 2
    I imagine it was voted down because "google made it this way" does not answer the question: Why did Google make it this way? If a user visits the site at 11:55pm and is active for just 10mins then GA appears to count 2 "sessions", when there is really only 1 user session that straddles midnight. Why is that? Is that really what happens? There might be a perfectly good reason for this, however, this would seem to (potentially) artificially inflate the number of real user sessions. (?)
    – MrWhite
    Apr 14, 2016 at 23:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.