Page MenuHomePhabricator

Log whether the user saw the basic or full information about an IP when opening the popup
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

Following on from T296415: Basic ipinfo instrument setup and first events, we'd like to know whether the user saw the basic or full information about an IP when opening the popup.

AC
  • The analytics.mediawiki.ipinfo_interaction schema has the following field added and its version bumped:
    • event_ipinfo_version
      • "basic"
      • "full"
  • When I click the ? button next to an IP address and I have the ipinfo-view-basic right an event should be logged
    • The event_action property should be "open_popup"
    • The event_ipinfo_version property should be "basic"
  • When I click the ? button next to an IP address and I have the ipinfo-view-full right an event should be logged
    • The event_ipinfo_version property should be "full"
Notes
  1. You can get the current user's rights in JavaScript via mw.user.getRights(), e.g.
mw.user.getRights(
    rights => rights.indexOf( 'ipinfo-view-full' ) !== -1
  )
  .then(
    canViewFull => {
      mw.eventLog.submit( /* ... */ );
    }
  );
  1. See the current.yaml files in the subdirectories in https://gerrit.wikimedia.org/r/plugins/gitiles/schemas/event/secondary/+/refs/heads/master/jsonschema/analytics/mediawiki for numerous examples of JSON Schema schemas that are used in production
  2. wt:Event Platform/Instrumentation How To is a step-by-step guide to creating a creating a schema and validating an event with it
  3. https://www.mediawiki.org/wiki/MediaWiki-Docker/Configuration_recipes/EventLogging is a step-by-step guide to setting up your local development environment

Event Timeline

phuedx renamed this task from Log event_ipinfo_version for open_popup events to Log whether the user saw the basic or full information about an IP when opening the popup.Nov 24 2021, 4:59 PM
phuedx updated the task description. (Show Details)
ARamirez_WMF renamed this task from Log whether the user saw the basic or full information about an IP when opening the popup to Log whether the user saw the basic or full information about an IP when opening the popup [S].Nov 30 2021, 5:29 PM
ARamirez_WMF renamed this task from Log whether the user saw the basic or full information about an IP when opening the popup [S] to Log whether the user saw the basic or full information about an IP when opening the popup.Feb 15 2022, 6:49 PM
ARamirez_WMF set the point value for this task to 2.

Change 777816 had a related patch set uploaded (by Tchanders; author: Tchanders):

[schemas/event/secondary@master] Add event_ipinfo_version to ipinfo_interaction schema

https://gerrit.wikimedia.org/r/777816

Change 777842 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/IPInfo@master] Record the access level of the user when logging the 'open_popup' event

https://gerrit.wikimedia.org/r/777842

Hi @Tchanders, is there a reason to event log the access level only from when opening the IPINfo popup? And not the IPinfobox?
I'm not seeing another ticket for it or a product conversation about it!

Hi @Tchanders, is there a reason to event log the access level only from when opening the IPINfo popup? And not the IPinfobox?
I'm not seeing another ticket for it or a product conversation about it!

Good question - @Niharika @jwang do you know?

@AGueyte We can move ahead with this task as is, and if we need to log from the infobox too we can make a new task for that

Change 777816 merged by jenkins-bot:

[schemas/event/secondary@master] Add event_ipinfo_version to ipinfo_interaction schema

https://gerrit.wikimedia.org/r/777816

Change 777842 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Record the access level of the user when logging the 'open_popup' event

https://gerrit.wikimedia.org/r/777842