snowplow / snowplow/snowplow-javascript-tracker

Consider decoupling session duration from page pings

Open
#379 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category:browser priority:low status:needs_triage type:enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.