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"
- event_ipinfo_version
- 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
- 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( /* ... */ ); } );
- 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
- wt:Event Platform/Instrumentation How To is a step-by-step guide to creating a creating a schema and validating an event with it
- https://www.mediawiki.org/wiki/MediaWiki-Docker/Configuration_recipes/EventLogging is a step-by-step guide to setting up your local development environment