One of the persistent pain-points for teams using EventLogging seems to be the ease with which schema violation errors can slip through to production and linger unnoticed. Validation errors are written to the browser console, where they are easy to miss.
There are several things we could do to make it easier to spot problems in client-side analytics code. I'd like to have live graphs showing the volume of data (valid and invalid) currently being logged under a particular schema integrated into the schema page in MetaWiki, and I'd like us to have some automatic alerting for that. Nuria is also working on making the process of testing analytics code in labs clearer and more useful.
// Show EventLogging validation errors in a dismissible bar at the top of page.
var $el = $( '<pre style="background: yellow; margin: 0; padding: 8px; position: fixed; top: 0; width: 100%; z-index: 99"></pre>' );
$el.click( function () { $el.empty().detach(); } );
mw.trackSubscribe( 'eventlogging.error', function ( topic, err ) {
$el.text( function ( idx, text ) {
return ( text && text + '\n' ) + err;
} ).appendTo( 'body' );
} );
This code won't do anything to change your user experience unless there are schema violations in the JavaScript code that is loaded by the page. If there are any errors, they will looks like this:
http://i.imgur.com/ReVnfbn.png