Log clicks on the original file link

Change-Id: I3022128ce1772d67f389322379ab8700265d2d29
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/715
This commit is contained in:
Gergő Tisza 2014-06-19 01:21:51 +00:00
parent f566f6e585
commit e5cb2c7f85
3 changed files with 3 additions and 1 deletions

View file

@ -903,7 +903,7 @@ $wgExtensionFunctions[] = function () {
global $wgResourceModules, $wgEventLoggingSchemas; global $wgResourceModules, $wgEventLoggingSchemas;
if ( isset( $wgResourceModules['ext.eventLogging'] ) ) { if ( isset( $wgResourceModules['ext.eventLogging'] ) ) {
$wgEventLoggingSchemas[ 'MediaViewer' ] = 8922098; $wgEventLoggingSchemas[ 'MediaViewer' ] = 8935489;
$wgEventLoggingSchemas[ 'MultimediaViewerNetworkPerformance' ] = 7917896; $wgEventLoggingSchemas[ 'MultimediaViewerNetworkPerformance' ] = 7917896;
$wgEventLoggingSchemas[ 'MultimediaViewerDuration' ] = 8572641; $wgEventLoggingSchemas[ 'MultimediaViewerDuration' ] = 8572641;

View file

@ -63,6 +63,7 @@
'fullscreen': 'User entered fullscreen mode.', 'fullscreen': 'User entered fullscreen mode.',
'defullscreen': 'User exited fullscreen mode.', 'defullscreen': 'User exited fullscreen mode.',
'close': 'User closed Media Viewer.', 'close': 'User closed Media Viewer.',
'view-original-file': 'User clicked on the direct link to the original file',
'file-description-page': 'User opened the file description page.', 'file-description-page': 'User opened the file description page.',
'file-description-page-abovefold': 'User opened the file description page via the above-the-fold button.', 'file-description-page-abovefold': 'User opened the file description page via the above-the-fold button.',
'use-this-file-open': 'User opened the dialog to use this file.', 'use-this-file-open': 'User opened the dialog to use this file.',

View file

@ -46,6 +46,7 @@
} ) } )
.addClass( 'mw-mmv-viewfile' ) .addClass( 'mw-mmv-viewfile' )
.click( function () { .click( function () {
mw.mmv.actionLogger.log( 'view-original-file' );
$( document ).trigger( 'mmv-viewfile' ); $( document ).trigger( 'mmv-viewfile' );
} ); } );