We would like to filter out edit links that create new pages from normal edit clicks
If the page issue template contains a link to the article talk page (like https://en.wikipedia.org/wiki/Template:NPOV : "Relevant discussion may be found on the talk page."), and the talk page doesn't exist, a click on that link will be incorrectly logged as modalEditClicked (instead of modalInternalClicked as intended). Example: https://lv.m.wikipedia.org/wiki/Ivars_Zaikins
I.e. many events that we interpret as an intention to change the article will instead have come from a mere intention to learn more about the issue. Hopefully this will largely cancel out in the A/B test as it affects both the old and new design, but it will impact our estimate of the size of the effects (in increasing edits, in particular), and our estimate for the frequency of edit attempts in general.
Tilman's patch filters out any red link edit clicks which gets us halfway to the solution. What remains, is making these links click elsewhere.
We have two possibilities
- Complicate our selectors and add red link clicks to modalInternalClicked (untested, but click a:not(.external):not([href*=edit]), a[href*="redlink=1"]:not(.external)' might work for modalInternalClicked
- Add a new event modalRedLinkClicked
Per https://phabricator.wikimedia.org/T204073#4577874 I propose the latter, but during estimation we may want to consider 1
- Update Schema:PageIssues to include the modalRedLinkClicked event
- Amend Tilman's patch to add a new click handler ('click a[href*=redlink]") and bump the revision number.
Make sure PageIssues instrumentation is enabled for 100% users
$wgMinervaABSamplingRate = 1;
Visit a page where there are red links in the page issues overlay
Verify that different events are fired when you click "talk page" (modalRedLinkClicked), "improve it" (modalEditClicked) and sources (modalInternalClicked). Clicking no link should trigger 2 of these events, they are mutually exclusive.