Page MenuHomePhabricator

Add 'hovercardsSuppressedByGadget' field to Schema:Popups and update the codebase to take this field into account
Closed, ResolvedPublic2 Story Points

Description

Currently we don't take the Navigation Popups gadget into account when logging events, which may distort EL analyses. When the NavPopups gadget is enabled, Hovercards will be disabled. This means that even though a user sees a navigation popup (using the gadget), 'dwelledButAbandoned' events will be logged when the user dismisses the popup. This is fine by itself, but it may give a wrong impression that the user didn't receive any info about the link.

To distinguish true 'dwelledButAbandoned' actions from the actions described above (or similar link context gadgets - presently the scope of this is limited to logged in users), do the following:

  • Modify the schema and add the hovercardsSuppressedByGadget (boolean, required) field.
  • Update the codebase accordingly to take the newly created field into account.
  • Notify @Tbayer and @JKatzWMF once the code has been merged and the estimated dates the change will take effect in production, so that they know when to amend their queries.

Details

Related Gerrit Patches:
mediawiki/extensions/Popups : masterUse Schema revision 15777589 for logging events

Event Timeline

bmansurov created this task.Jun 7 2016, 2:09 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 7 2016, 2:09 PM
dr0ptp4kt triaged this task as Medium priority.Jun 7 2016, 3:24 PM
dr0ptp4kt added a project: Readers-Web-Backlog.
dr0ptp4kt moved this task from Incoming to 2016-17 Q2 on the Readers-Web-Backlog board.

Adding @Tbayer and @JKatzWMF for visibility. Until this bug is fixed, I recommend exclusion of analysis of authenticated users for which HoverCards is deemed OFF. Presently the bug isn't slated for a fix until next quarter, if at all.

We may have to calculate navpopGadgetEnabled when we log since we don't know when the gadget loads. Same way we check for it every time there is a hover.

dr0ptp4kt renamed this task from Add 'navpopGadgetEnabled' field to Schema:Popups and update the codebase to take this field into account to Add 'hovercardsSuppressedByGadget' field to Schema:Popups and update the codebase to take this field into account.Jun 27 2016, 5:07 PM
dr0ptp4kt updated the task description. (Show Details)
dr0ptp4kt raised the priority of this task from Medium to High.Jul 7 2016, 1:44 PM
dr0ptp4kt updated the task description. (Show Details)

I give the task 2 points.

bmansurov set the point value for this task to 2.Jul 7 2016, 5:08 PM
phuedx added a subscriber: phuedx.Jul 7 2016, 7:32 PM

I think 2 is reasonable.

bmansurov moved this task from To Do to Doing on the Reading-Web-Sprint-77-Segmentation-fault board.

Change 299733 had a related patch set uploaded (by Bmansurov):
Use Schema revision 15777589 for logging events

https://gerrit.wikimedia.org/r/299733

Modify the schema and add the hovercardsSuppressedByGadget (boolean, required) field.

https://meta.wikimedia.org/w/index.php?title=Schema%3APopups&type=revision&diff=15777589&oldid=15597282

phuedx reassigned this task from bmansurov to dr0ptp4kt.Jul 25 2016, 9:22 AM

I believe we'll need to wait for this to ride the train so we can check somewhere like www.mediawiki.org or, depending on timing, another production wiki. en.wikipedia.beta.wmflabs.org seems to send "hovercardsSuppressedByGadget":false when both the Navigation Popups gadget and Hovercards are turned on. reading-web-staging.wmflabs.org doesn't seem to have Gadget support.

If I'm reading the review correctly from @bmansurov and @phuedx (who should correct me if I'm wrong) it seems the value of hovercardsSuppressedByGadget can change during execution due to the way gadgets load. This value becomes true when the gadget code has loaded (not true if enabled and still loading).

It is thus the case that a user in a single session could hover over a link, see a popup, log hovercardsSuppressedByGadget as false and then hover over another link that logs hovercardsSuppressedByGadget as true and see the gadget hovercard.

It's an edge case that should rarely happen but it's worth pointing out that it's possible for the purposes of anyone doing data analysis.

dr0ptp4kt closed this task as Resolved.Jul 29 2016, 9:05 PM

It appears to be working now on en.wikipedia.org. While logged in with both navpopups gadget and Hovercards (Popups extension) turned on, the hovercardsSuppressedByGadget field is being populated with the value true. Heads up @Tbayer and @JKatzWMF. You'll want to use the new schema if analyzing logged in scenarios. Do note above the previous comment about an edge case.

Signing off.

@Tbayer, @JKatzWMF: the following depicts the decrease in events for the old schema and increase for the new one for your choice of where to draw the boundary for your queries. It looks like 20160729 is not a bad day from which to do any day-over-day sorts of plotting.

mysql:research@s6-analytics-slave.eqiad.wmnet [log]> select left(timestamp,10) ts, count(*) from Popups_15597282 where timestamp > '20160725' group by ts;
ts	count(*)
2016072500	2220
2016072501	1506
2016072502	2044
2016072503	1378
2016072504	2020
2016072505	3156
2016072506	5852
2016072507	7735
2016072508	7919
2016072509	10362
2016072510	9003
2016072511	10069
2016072512	11280
2016072513	11386
2016072514	9987
2016072515	9244
2016072516	8735
2016072517	10784
2016072518	10338
2016072519	11057
2016072520	9370
2016072521	6763
2016072522	3972
2016072523	2654
2016072600	1828
2016072601	1033
2016072602	2011
2016072603	2171
2016072604	2342
2016072605	3415
2016072606	5252
2016072607	6860
2016072608	8779
2016072609	10693
2016072610	9166
2016072611	10179
2016072612	9790
2016072613	10687
2016072614	8796
2016072615	8619
2016072616	7882
2016072617	8884
2016072618	9177
2016072619	8580
2016072620	9127
2016072621	7195
2016072622	4891
2016072623	3340
2016072700	1535
2016072701	1091
2016072702	1156
2016072703	1397
2016072704	1756
2016072705	2798
2016072706	4535
2016072707	7385
2016072708	7496
2016072709	7928
2016072710	9238
2016072711	9565
2016072712	9044
2016072713	9783
2016072714	9824
2016072715	8602
2016072716	9392
2016072717	9251
2016072718	8699
2016072719	11057
2016072720	9835
2016072721	7327
2016072722	4583
2016072723	2956
2016072800	1766
2016072801	1432
2016072802	998
2016072803	1166
2016072804	1716
2016072805	2600
2016072806	4843
2016072807	7066
2016072808	9136
2016072809	9406
2016072810	8326
2016072811	9663
2016072812	10424
2016072813	10977
2016072814	9836
2016072815	8210
2016072816	8061
2016072817	9873
2016072818	9034
2016072819	1900
2016072820	59
2016072821	43
2016072822	71
2016072823	3
2016072900	5
2016072902	1
2016072903	1
2016072904	6
2016072905	10
2016072906	10
2016072907	19
2016072908	5
2016072909	14
2016072910	3
2016072911	6
2016072912	6
2016072913	3
2016072914	10
2016072915	1
2016072916	1
2016072917	2
2016072918	5
2016072920	1
2016072921	2
2016072922	2
2016073002	1
mysql:research@s6-analytics-slave.eqiad.wmnet [log]> select left(timestamp,10) ts, count(*) from Popups_15777589 where timestamp > '20160725' group by ts;
ts	count(*)
2016072622	10
2016072703	24
2016072704	1
2016072707	21
2016072708	1
2016072709	4
2016072713	22
2016072714	2
2016072720	153
2016072721	34
2016072722	99
2016072723	1
2016072800	123
2016072801	162
2016072802	17
2016072803	137
2016072804	127
2016072805	23
2016072806	278
2016072807	284
2016072808	246
2016072809	175
2016072810	191
2016072811	288
2016072812	407
2016072813	396
2016072814	382
2016072815	286
2016072816	155
2016072817	82
2016072818	139
2016072819	7252
2016072820	8356
2016072821	7556
2016072822	4922
2016072823	3086
2016072900	1923
2016072901	1842
2016072902	1487
2016072903	1778
2016072904	2178
2016072905	3235
2016072906	4771
2016072907	7521
2016072908	8911
2016072909	9030
2016072910	7841
2016072911	8971
2016072912	8769
2016072913	9314
2016072914	7959
2016072915	8595
2016072916	7034
2016072917	7454
2016072918	8143
2016072919	8292
2016072920	9098
2016072921	6800
2016072922	3913
2016072923	3317
2016073000	2200
2016073001	1533
dr0ptp4kt updated the task description. (Show Details)Jul 30 2016, 2:22 AM