Page MenuHomePhabricator

Homepage: links open in new tab don't log link-click
Closed, DeclinedPublicBUG REPORT

Description

Steps to Reproduce:

Go to the newcomer homepage and right click on a link (such as the "Tutorial" button) to open it in a new tab. Note this only occurs when opening a link with a right click, not with a cmd-click.

Actual Results:

A hover-out and a hover-in event are logged in sequence (in addition to the hover-in from going to the link in the first place).

Expected Results:

Only a link-click event is logged, and no hovers are logged.

Note: we will not address this before May 2.

Event Timeline

Expected Results:

Only a link-click event is logged, and no hovers are logged.

I'm confused, why wouldn't a hover be logged? You need to hover over the start-tutorial module to be able to click the link.

Here's what I see when I move the mouse over the tutorial module, right click on the link to open it in a new tab, then move the mouse again.

image.png (2,624×312 px, 159 KB)

@kostajh -- I meant that in the situations I see, hovers are logged in place of a link-click event. The sequence I am seeing is: hover-in, hover-out, hover-in, hover-out. The expected sequence is hover-in, link-click, hover-out.

Interestingly, I tried to do this with the actual "Tutorial" button, but that button isn't a link, so I can't right click to open it in a new tab. But I was able to do it with the "Get a new link" button in the email module. In the gif below you can see that no link-click event is recorded.

homepage_link-click_2019-04-30.gif (1,221×731 px, 262 KB)

According to the browser, right click > "open in new tab" is not a "click" event. It's a "mousedown", followed by a "contextmenu", and the actual click to the menu option is a low level event not defined in Javascript. So we don't have access to it.

The only solution I see is adding a parameter dynamically and logging the event server-side. If we go there, it would make sense to convert all the "link-click" to a server-side "visit" because all the links they can technically be accessed using the menu. It would be better to not have 2 ways to log the same thing.

About the two pairs of hover in/out events, the browser considers that when a menu option is selected, the cursor is temporarily out of the HTML element and then on it again. This can be seen with options like "copy", "save link as...", etc.

We could be technically able to detect a short "out and then back in" situation, both in the app and during data analysis, but I don't think we need to do something special here since it's not going to affect total time on each module if we sum up all the time(hover-out) - time(hover-in).

Thanks for the clarification, @SBisson. So the "link-click" is logged when the user presses cmd-click, and not when the right click menu opens a new tab. I will clarify in the description and keep this in our backlog. It is not necessary to address this before May 2. We'll decide whether we think we're missing these clicks later.

Urbanecm_WMF subscribed.

Our custom logger was removed, so this is no longer actionable.