Page MenuHomePhabricator

Fix duplicate logging of click events in Hovercards
Closed, ResolvedPublic3 Estimate Story Points


See T141922#2578626 for context.

With hovercards enabled and the experiment enabled, users in the control group (previews OFF) when hovering a link multiple times and then clicking it will submit multiple click events.


In the hovercards OFF case, when the user clicks a link that has been hovered multiple times, then multiple click events are logged with different linkInteractionTokens. Events have a decreasing totalInteractionTime, e.g. in the automated tests that were run we saw one event with a totalInteractionTime on the order of 100ms and one on the order of 10ms (in real data this will depend on the user's actions and their timing).


When preview is disabled a click event is bound in every hover that is never unbound, which doesn't happen when preview is enabled. As @phuedx mentioned in T141922#2574587, binding click events follows different code paths for the OFF and ON groups.

In source


  • When hovercards is enabled but I'm in the control group (previews disabled), when hovering a link multiple times and then clicking it only one click event will be sent to analytics about that link I clicked.


Related Gerrit Patches:
mediawiki/extensions/Popups : masterDo not log the click event multiple times

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 24 2016, 4:50 PM
Jhernandez updated the task description. (Show Details)Aug 24 2016, 4:51 PM
Jhernandez moved this task from Incoming to 2016-17 Q2 on the Readers-Web-Backlog board.
dr0ptp4kt triaged this task as High priority.Aug 29 2016, 4:20 PM
MBinder_WMF set the point value for this task to 3.Aug 29 2016, 4:25 PM
bmansurov moved this task from To Do to Doing on the Reading-Web-Sprint-80-V-for-Vandalism board.

Change 307352 had a related patch set uploaded (by Bmansurov):
Do not log the click event multiple times

Change 307352 merged by jenkins-bot:
Do not log the click event multiple times

From my review of 1d71b3d9:

This LGTM.
With the popups experiment disabled in my LocalSettings.php, i.e.

$wgPopupsExperiment = false;

and disabling popups via the cog dialog (dialcog?), I ran the following tests:

  1. After clicking a link I should see the following events: pageLoaded opened in same tab ✔
  2. After hovering over a link, abandoning the link, and clicking the link I should see the following events: pageLoaded dwelledButAbandoned opened in same tab ✔

I ran test 2 a number of times, varying the number of times that I hovered and abandoned the link and verified that I only saw one "opened in same tab" event.

ovasileva closed this task as Resolved.Aug 31 2016, 7:53 PM

@Jhernandez - closing for this task, if other tasks arise related to duplicate events from the spike let's track them separately