snowplow-javascript-tracker icon indicating copy to clipboard operation
snowplow-javascript-tracker copied to clipboard

Consider decoupling session duration from page pings

Open fblundun opened this issue 9 years ago • 2 comments

Sessions are based on the session cookie which is present if any event has been fired on the page in the last 30 minutes and absent otherwise. So if a user is on a page continuously for over 30 minutes without sending an event, a new session will be started the next time an event is sent.

If page pings are enabled, events are sent frequently as long as the user is active on the page (e.g. moving the mouse or pressing keys). So the session will only expire if the user is really inactive.

But if page pings are not enabled and a user is active on a page but doesn't cause any events, the session will still expire after 30 minutes.

Almost everybody seems to use page pings, and users staying on a page without causing events are quite rare, so this isn't a big issue. But it might still be worth thinking about.

fblundun avatar Jun 29 '15 10:06 fblundun

which is present if no events have been fired on the page in the last 30 minutes and absent otherwise

is there a stray "no" in there?

alexanderdean avatar Jun 29 '15 12:06 alexanderdean

You're right, I've edited to fix this!

fblundun avatar Jun 29 '15 12:06 fblundun