snowplow / snowplow/snowplow-javascript-tracker
Consider decoupling session duration from page pings
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 590
- Forks
- 232
- Avg merge
- 2h 22m
- Merged PRs (30d)
- 3
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the session-cookie and page-ping behavior described in the issue. Determine whether session duration should be decoupled from event activity, and define the expected behavior for active users without page pings before identifying implementation and test entry points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- analytics, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100