snowplow-javascript-tracker
snowplow-javascript-tracker copied to clipboard
Consider decoupling session duration from page pings
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.
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?
You're right, I've edited to fix this!