Steps to reproduce
- Visit https://en.m.wikipedia.org
- Login
- Enable "Advanced mode"
- Visit https://en.m.wikipedia.org/wiki/Maybeshewill
- Open the user menu button or the page actions overflow menu
Expected results
- A MobileWebUIActionsTracking event is sent without the destination field set
Actual results
- A MobileWebUIActionsTracking event is sent with the destination field set to null
Environments observed
All environments where the MobileWebUIActionsTracking instrumentation is enabled.
Check any additional observations
✓ Observed on the beta cluster wiki
✓ Observed on a production wiki
- Observed on Vector desktop skin
✓ Observed on MinervaNeue skin
✓ Observed while logged in
- Observed while not logged in (anonymous)
Notes
418 "None is not of type 'string'" errors were in the last 24 hours for the MobileWebUIActionsTracking schema. All of those erroneous events have the destination property explicitly set to null. Because the property is present, it's validated.
One solution is to not set the property when it doesn't have a value, i.e. in ext.wikimediaEvents.mobileWebUIActions.js change:
var element = event.target, name = element.getAttribute( 'data-event-name' ); if ( name ) { schemaMobileWebUIActionsTracking.log( { action: 'click', name: name, token: user.sessionId(), destination: element.getAttribute( 'href' ) } ); }
to
var element = event.target, name = element.getAttribute( 'data-event-name' ) destination, event; if ( !name ) { return; } event = { action: 'click', name: name, token: user.sessionId() } destination = element.getAttribute( 'href' ); if ( destination ) { event.destination = destination; } schemaMobileWebUIActionsTracking.log( event );
QA Results
AC | Status | Details |
---|---|---|
1 | ✅ | T232723#5527208 |
QA Results:Production
AC | Status | Details |
---|---|---|
1 | ✅ | T232723#5527212 |