mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
Log all dwelledButAbandoned events
Extract the minimum interaction time of dwelledButAbandoned events to a unique place: mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME Lower that interaction time to 0 so that all dwelledButAbandoned events are logged. Bug: T145379 Change-Id: Id68183367966b9f0d52e0cd570cab64671a3e87e
This commit is contained in:
parent
eb852cacd5
commit
9787f515d0
|
@ -50,6 +50,14 @@
|
|||
*/
|
||||
mw.popups.render.API_DELAY = 50;
|
||||
|
||||
/**
|
||||
* Minimum time to log dwelledButAbandoned events. Initially considered as
|
||||
* 250ms to avoid accidental hovers being logged. Now logging all events to
|
||||
* verify data. See T145379
|
||||
* @property DWELL_EVENTS_MIN_INTERACTION_TIME
|
||||
*/
|
||||
mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME = 0;
|
||||
|
||||
/**
|
||||
* Cache of all the popups that were opened in this session
|
||||
* @property {Object} cache
|
||||
|
@ -332,7 +340,7 @@
|
|||
mw.popups.render.leaveInactive = function () {
|
||||
if ( logData.dwellStartTime &&
|
||||
logData.linkInteractionToken &&
|
||||
mw.now() - logData.dwellStartTime >= 250
|
||||
mw.now() - logData.dwellStartTime >= mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME
|
||||
) {
|
||||
mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, {
|
||||
action: 'dwelledButAbandoned',
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
$this.off( 'mouseleave blur', onLinkAbandon );
|
||||
|
||||
if ( data.dwellStartTime && data.linkInteractionToken &&
|
||||
mw.now() - data.dwellStartTime >= 250
|
||||
mw.now() - data.dwellStartTime >= mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME
|
||||
) {
|
||||
mw.track( 'ext.popups.schemaPopups', {
|
||||
pageTitleHover: $this.attr( 'title' ),
|
||||
|
|
Loading…
Reference in a new issue