Hygiene: Rename track topic to be more consistent with new plans

I plan to track events that will not be logged by the schema so
am dropping the 'schema' from the topic name.

This will allow us to track events that we do not log via the schema

Change-Id: I0c2762f7ed6e54fff765513b2c2d32f73fe8902f
This commit is contained in:
jdlrobson 2016-10-20 09:38:35 -07:00
parent fcef6d2fff
commit 1f010664ef
5 changed files with 10 additions and 10 deletions

View file

@ -68,7 +68,7 @@
currentRequest.fail( function ( textStatus, data ) { currentRequest.fail( function ( textStatus, data ) {
// only log genuine errors, not client aborts // only log genuine errors, not client aborts
if ( data.textStatus !== 'abort' ) { if ( data.textStatus !== 'abort' ) {
mw.track( 'ext.popups.schemaPopups', $.extend( logData, { mw.track( 'ext.popups.event', $.extend( logData, {
action: 'error', action: 'error',
errorState: textStatus, errorState: textStatus,
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime ) totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
@ -552,7 +552,7 @@
mw.popups.settings.open( $.extend( {}, logData ) ); mw.popups.settings.open( $.extend( {}, logData ) );
mw.track( 'ext.popups.schemaPopups', $.extend( logData, { mw.track( 'ext.popups.event', $.extend( logData, {
action: 'tapped settings cog', action: 'tapped settings cog',
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime ) totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
} ) ); } ) );

View file

@ -85,7 +85,7 @@
mw.popups.saveEnabledState( false ); mw.popups.saveEnabledState( false );
$( '#mwe-popups-settings-form, #mwe-popups-settings .save' ).hide(); $( '#mwe-popups-settings-form, #mwe-popups-settings .save' ).hide();
$( '#mwe-popups-settings-help, #mwe-popups-settings .okay' ).show(); $( '#mwe-popups-settings-help, #mwe-popups-settings .okay' ).show();
mw.track( 'ext.popups.schemaPopups', $.extend( {}, currentLinkLogData, { mw.track( 'ext.popups.event', $.extend( {}, currentLinkLogData, {
action: 'disabled' action: 'disabled'
} ) ); } ) );
} }

View file

@ -31,7 +31,7 @@
* @param {Object} event * @param {Object} event
*/ */
function logClickAction( event ) { function logClickAction( event ) {
mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, { mw.track( 'ext.popups.event', $.extend( {}, logData, {
action: mw.popups.getAction( event ), action: mw.popups.getAction( event ),
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime ) totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
} ) ); } ) );
@ -41,7 +41,7 @@
* Logs when a popup is dismissed * Logs when a popup is dismissed
*/ */
function logDismissAction() { function logDismissAction() {
mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, { mw.track( 'ext.popups.event', $.extend( {}, logData, {
action: 'dismissed', action: 'dismissed',
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime ) totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
} ) ); } ) );
@ -371,7 +371,7 @@
var $activeLink = getActiveLink(); var $activeLink = getActiveLink();
if ( logData.dwellStartTime && logData.linkInteractionToken ) { if ( logData.dwellStartTime && logData.linkInteractionToken ) {
mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, { mw.track( 'ext.popups.event', $.extend( {}, logData, {
action: 'dwelledButAbandoned', action: 'dwelledButAbandoned',
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime ) totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
} ) ); } ) );

View file

@ -8,7 +8,7 @@
mw.popups.schemaPopups.getDefaultValues() mw.popups.schemaPopups.getDefaultValues()
); );
mw.trackSubscribe( 'ext.popups.schemaPopups', function ( topic, data ) { mw.trackSubscribe( 'ext.popups.event', function ( topic, data ) {
var shouldLog = true; var shouldLog = true;
data = mw.popups.schemaPopups.getMassagedData( data ); data = mw.popups.schemaPopups.getMassagedData( data );

View file

@ -21,7 +21,7 @@
$this.off( 'mouseleave blur', onLinkAbandon ); $this.off( 'mouseleave blur', onLinkAbandon );
if ( data.dwellStartTime && data.linkInteractionToken ) { if ( data.dwellStartTime && data.linkInteractionToken ) {
mw.track( 'ext.popups.schemaPopups', { mw.track( 'ext.popups.event', {
pageTitleHover: $this.attr( 'title' ), pageTitleHover: $this.attr( 'title' ),
action: 'dwelledButAbandoned', action: 'dwelledButAbandoned',
totalInteractionTime: Math.round( mw.now() - data.dwellStartTime ), totalInteractionTime: Math.round( mw.now() - data.dwellStartTime ),
@ -80,7 +80,7 @@
$this.off( 'click', onLinkClick ); $this.off( 'click', onLinkClick );
mw.track( 'ext.popups.schemaPopups', { mw.track( 'ext.popups.event', {
pageTitleHover: $this.attr( 'title' ), pageTitleHover: $this.attr( 'title' ),
action: action, action: action,
totalInteractionTime: Math.round( mw.now() - data.dwellStartTime ), totalInteractionTime: Math.round( mw.now() - data.dwellStartTime ),
@ -184,7 +184,7 @@
initPopups(); initPopups();
} }
mw.track( 'ext.popups.schemaPopups', { mw.track( 'ext.popups.event', {
action: 'pageLoaded', action: 'pageLoaded',
hovercardsSuppressedByGadget: isNavigationPopupsGadgetEnabled() hovercardsSuppressedByGadget: isNavigationPopupsGadgetEnabled()
} ); } );