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

Add feature to explicitly handle 'stray' page pings

Open colmsnowplow opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe.

If a user leaves a tab dormant for a long time then returns, they can trigger page ping events which share a page view ID with the original page view, but have a different session id (because the session timeout expired).

Now we may not want to disregard these - the user might continue to browse with genuine activity from there, in which case activity on the reactivated tab would currently be disregarded (as it doesn't have a page view).

At modeling stage this poses a bit of a challenge.

Describe the solution you'd like

I can think of two approaches -

  1. some option to trigger a new page view when a tab is reactivated (for example if the session ID changes, trigger a page view perhaps).
  2. A new page-view-like event which specifically denotes reactivation of a tab.

Both solutions should deal with the page ping timer somehow to ensure consistent behaviour.

colmsnowplow avatar May 05 '21 11:05 colmsnowplow

ZD ticket reference 26783 for an example (closed source) of when this comes into focus

colmsnowplow avatar May 05 '21 12:05 colmsnowplow

Some discussion: https://discourse.snowplowanalytics.com/t/page-id-crosses-sessions-and-over-inflates-time/5410/3

colmsnowplow avatar Jul 22 '21 10:07 colmsnowplow

Ping aggregation deepens the requirement for a feature as the unload event must be triggered to receive the aggregate pings, these can be aggregated over many sessions. Therefore no 'stray pings' occur rather a 'stray event'.

I think possibly 2 event types like page_view_end (session close) and page_view_resume (new ping/event on same page) would be ideal.

kfitz-hub avatar Jul 22 '21 12:07 kfitz-hub