mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 07:34:11 +00:00
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:
parent
fcef6d2fff
commit
1f010664ef
|
@ -68,7 +68,7 @@
|
|||
currentRequest.fail( function ( textStatus, data ) {
|
||||
// only log genuine errors, not client aborts
|
||||
if ( data.textStatus !== 'abort' ) {
|
||||
mw.track( 'ext.popups.schemaPopups', $.extend( logData, {
|
||||
mw.track( 'ext.popups.event', $.extend( logData, {
|
||||
action: 'error',
|
||||
errorState: textStatus,
|
||||
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
|
||||
|
@ -552,7 +552,7 @@
|
|||
|
||||
mw.popups.settings.open( $.extend( {}, logData ) );
|
||||
|
||||
mw.track( 'ext.popups.schemaPopups', $.extend( logData, {
|
||||
mw.track( 'ext.popups.event', $.extend( logData, {
|
||||
action: 'tapped settings cog',
|
||||
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
|
||||
} ) );
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
mw.popups.saveEnabledState( false );
|
||||
$( '#mwe-popups-settings-form, #mwe-popups-settings .save' ).hide();
|
||||
$( '#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'
|
||||
} ) );
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* @param {Object} event
|
||||
*/
|
||||
function logClickAction( event ) {
|
||||
mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, {
|
||||
mw.track( 'ext.popups.event', $.extend( {}, logData, {
|
||||
action: mw.popups.getAction( event ),
|
||||
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
|
||||
} ) );
|
||||
|
@ -41,7 +41,7 @@
|
|||
* Logs when a popup is dismissed
|
||||
*/
|
||||
function logDismissAction() {
|
||||
mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, {
|
||||
mw.track( 'ext.popups.event', $.extend( {}, logData, {
|
||||
action: 'dismissed',
|
||||
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
|
||||
} ) );
|
||||
|
@ -371,7 +371,7 @@
|
|||
var $activeLink = getActiveLink();
|
||||
|
||||
if ( logData.dwellStartTime && logData.linkInteractionToken ) {
|
||||
mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, {
|
||||
mw.track( 'ext.popups.event', $.extend( {}, logData, {
|
||||
action: 'dwelledButAbandoned',
|
||||
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
|
||||
} ) );
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
mw.popups.schemaPopups.getDefaultValues()
|
||||
);
|
||||
|
||||
mw.trackSubscribe( 'ext.popups.schemaPopups', function ( topic, data ) {
|
||||
mw.trackSubscribe( 'ext.popups.event', function ( topic, data ) {
|
||||
var shouldLog = true;
|
||||
|
||||
data = mw.popups.schemaPopups.getMassagedData( data );
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
$this.off( 'mouseleave blur', onLinkAbandon );
|
||||
|
||||
if ( data.dwellStartTime && data.linkInteractionToken ) {
|
||||
mw.track( 'ext.popups.schemaPopups', {
|
||||
mw.track( 'ext.popups.event', {
|
||||
pageTitleHover: $this.attr( 'title' ),
|
||||
action: 'dwelledButAbandoned',
|
||||
totalInteractionTime: Math.round( mw.now() - data.dwellStartTime ),
|
||||
|
@ -80,7 +80,7 @@
|
|||
|
||||
$this.off( 'click', onLinkClick );
|
||||
|
||||
mw.track( 'ext.popups.schemaPopups', {
|
||||
mw.track( 'ext.popups.event', {
|
||||
pageTitleHover: $this.attr( 'title' ),
|
||||
action: action,
|
||||
totalInteractionTime: Math.round( mw.now() - data.dwellStartTime ),
|
||||
|
@ -184,7 +184,7 @@
|
|||
initPopups();
|
||||
}
|
||||
|
||||
mw.track( 'ext.popups.schemaPopups', {
|
||||
mw.track( 'ext.popups.event', {
|
||||
action: 'pageLoaded',
|
||||
hovercardsSuppressedByGadget: isNavigationPopupsGadgetEnabled()
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue