Page MenuHomePhabricator

Log whether the user saw the basic or full information about an IP when opening the popup [S]
Open, Needs TriagePublic

Description

Background

Following on from T296415: Basic ipinfo instrument setup and first events [L], 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.Wed, Nov 24, 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].Tue, Nov 30, 5:29 PM