mediawiki-extensions-Visual.../modules/ve-mw/ve.track.js

10 lines
301 B
JavaScript
Raw Permalink Normal View History

// In VE-MW, track events using MediaWiki's system instead of VisualEditor's
ve.track = mw.track;
ve.trackSubscribe = mw.trackSubscribe;
ve.trackSubscribe( 'activity.', ( topic, data ) => {
mw.track( 'visualEditorFeatureUse', ve.extendObject( data, {
feature: topic.split( '.' )[ 1 ]
} ) );
} );