diff --git a/README.md b/README.md index 629125c..2012422 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,11 @@ for the page. Controls whether site notices should be shown. See . +#### $wgMinervaCountErrors +* Type: `Boolean` +* Default: `false` + +Whether to count client side errors in statsv. #### $wgMinervaErrorLogSamplingRate * Type: `Integer` diff --git a/includes/MinervaHooks.php b/includes/MinervaHooks.php index fee4cd8..08c51b3 100644 --- a/includes/MinervaHooks.php +++ b/includes/MinervaHooks.php @@ -197,6 +197,7 @@ class MinervaHooks { 'wgMinervaSchemaMainMenuClickTrackingSampleRate' => $config->get( 'MinervaSchemaMainMenuClickTrackingSampleRate' ), 'wgMinervaABSamplingRate' => $config->get( 'MinervaABSamplingRate' ), + 'wgMinervaCountErrors' => $config->get( 'MinervaCountErrors' ), 'wgMinervaErrorLogSamplingRate' => $config->get( 'MinervaErrorLogSamplingRate' ), 'wgMinervaReadOnly' => wfReadOnly() ]; diff --git a/resources/skins.minerva.scripts/errorLogging.js b/resources/skins.minerva.scripts/errorLogging.js index 9e5c2fc..8bbd90e 100644 --- a/resources/skins.minerva.scripts/errorLogging.js +++ b/resources/skins.minerva.scripts/errorLogging.js @@ -45,6 +45,9 @@ }, DEFAULT_ERROR_DATA ) ); } + if ( config.get( 'wgMinervaCountErrors' ) ) { + mw.track( 'counter.MediaWiki.minerva.WebClientError', 1 ); + } } // track RL exceptions trackSubscribe( 'resourceloader.exception', function ( topic, data ) { diff --git a/skin.json b/skin.json index f7e4b56..89744c1 100644 --- a/skin.json +++ b/skin.json @@ -22,6 +22,7 @@ } }, "config": { + "MinervaCountErrors": false, "MinervaErrorLogSamplingRate": 0, "MinervaDownloadNamespaces": [ 0 ], "MinervaEnableSiteNotice": false,