From e5cb2c7f851708c297227ccb26b8798142e874f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Tisza?= Date: Thu, 19 Jun 2014 01:21:51 +0000 Subject: [PATCH] Log clicks on the original file link Change-Id: I3022128ce1772d67f389322379ab8700265d2d29 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/715 --- MultimediaViewer.php | 2 +- resources/mmv/mmv.ActionLogger.js | 1 + resources/mmv/ui/mmv.ui.canvasButtons.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 6114864cb..b148ba40d 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -903,7 +903,7 @@ $wgExtensionFunctions[] = function () { global $wgResourceModules, $wgEventLoggingSchemas; if ( isset( $wgResourceModules['ext.eventLogging'] ) ) { - $wgEventLoggingSchemas[ 'MediaViewer' ] = 8922098; + $wgEventLoggingSchemas[ 'MediaViewer' ] = 8935489; $wgEventLoggingSchemas[ 'MultimediaViewerNetworkPerformance' ] = 7917896; $wgEventLoggingSchemas[ 'MultimediaViewerDuration' ] = 8572641; diff --git a/resources/mmv/mmv.ActionLogger.js b/resources/mmv/mmv.ActionLogger.js index f7e6c54c3..3d5c0104a 100644 --- a/resources/mmv/mmv.ActionLogger.js +++ b/resources/mmv/mmv.ActionLogger.js @@ -63,6 +63,7 @@ 'fullscreen': 'User entered fullscreen mode.', 'defullscreen': 'User exited fullscreen mode.', '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-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.', diff --git a/resources/mmv/ui/mmv.ui.canvasButtons.js b/resources/mmv/ui/mmv.ui.canvasButtons.js index 056722ce5..8750fd7d5 100644 --- a/resources/mmv/ui/mmv.ui.canvasButtons.js +++ b/resources/mmv/ui/mmv.ui.canvasButtons.js @@ -46,6 +46,7 @@ } ) .addClass( 'mw-mmv-viewfile' ) .click( function () { + mw.mmv.actionLogger.log( 'view-original-file' ); $( document ).trigger( 'mmv-viewfile' ); } );