sessionTick.js currently has a bug where, if the client does not support localStorage:
The instrument would be fetched, executed, and start ticking. Every tick it would try to read the tick count and last tick from localStorage, which would silently fail, and so would emit a single tick: 1 event. Interestingly, it would idle due to inactivity as usual but when it became active again it would try to read the tick count and last tick from localStorage, which would silently fail, not reset the session and would also emit a single tick: 1
In short, the number of events wouldn't change but they would all be tick: 1 rather than tick: [1,2,3,4,…,n)
Acceptance criteria
- Session tick instrument checks if localStorage is supported
- If localStorage is supported, proceed as before
- If localStorage is not supported:
- Log an event (see below)
- Do NOT proceed (do not send a tick)
- If localStorage is not supported, log an event:
{ "action": "feature_not_available", "action_context": "localStorage" }
- The "Session tick feature availability" (session-tick-feature-availability) instrument should produce events to product_metrics.web_base_with_ip stream. It should be configured to have the following contextual attributes:
- agent_ua_string
- performer_active_browsing_session_token
- performer_session_id
- performer_is_logged_in
- L3SC request submitted & approved for this HIGH risk data collection activity
Bonus criteria
- Instead of silently failing in detectPassiveEventListenerSupport(), log an event:
{ "action": "feature_not_available", "action_context": "passiveEventListener" }