Below are two edge cases when HelpPanel logs events incorrectly. Although it may lead to record data that seems incomplete or wrong, such cases most likely to be really rare.
(1) A user is blocked (site wide) from editing article. Attempting to edit will produce an impression event that attributed to 'reading' but has "page_ns": 0 which is logically correct (a user can only read the article) but might look confusing.
{ "event": { "action": "impression", "action_data": "", "user_id": 16448, "user_editcount": 0, "editor_interface": "reading", "is_mobile": false, "page_id": 0, "page_title": "", "page_ns": 0, "user_can_edit": true, "page_protection": "", "session_token": "89a31ad4be6bd33dc32b", "help_panel_session_id": "515bf6301b3da6494691" }, "revision": 18920393, "schema": "HelpPanel", "webHost": "en.wikipedia.beta.wmflabs.org", "wiki": "enwiki" }
(2) A protected page - the Help panel is shown when a user clicks on 'View source' option (for users who cannot edit protected pages). Clicks on 'View source' won't trigger impression event. All other Help panel are recorded as usual.
Note: the case when a user attempts to visit a page to which they do not have rights to view, seems not to be applicable to HelpPanel presence. Such pages are Special pages where HelpPanel is not enabled.
Actionable items
- Fix the protected page logging, so that impressions are logged.
- When a user is blocked site-wide, don't show them the help panel.
- When a user has a partial block, show the help panel.