Page MenuHomePhabricator

Determine expected amount of usage of mobile print to PDF button per browser
Closed, ResolvedPublic

Description

Background

In T179529: [Spike] Can we detect browsers where the window.print function simply doesn't work? we saw that on Android, the print to PDF button only works for Chrome browsers. Thus, we would like to give the functionality to all other browsers by rendering the PDFs via headless Chromium. We would like to get an estimate of the amount of traffic these renders will have.

Acceptance Criteria

  • Test that the Print instrumentation works as expected for Chrome mobile on Android, both for the standard print path ("Share" --> "Print") and for the custom PDF download button deployed on November 15 (T179914). See e.g. the testing method described at T179914#3767547 and the discussion at T181297 .

--> done in T181297#3920633 ff. (at least for the download button)

  • Review print button usage on Chrome mobile using the Print instrumentation to determine average number of prints per pageview per minute/hour/day/month.

@phuedx: See T179915#4266991.

  • Use the above data to create rough estimates for usage for the following browsers based on their pageviews for the same period:
  • Firefox mobile
  • Opera mobile
  • Opera mini
  • UC Browser
  • Dolphin
  • Maxthon

--> T179915#4586134

Notes

  1. Daily pageviews, at least, are available in Pivot.
  2. We would begin looking at usage after T179914: Deploy print to PDF button for Chrome on Android is complete (the button is deployed to Chrome)

Related Objects

Event Timeline

ovasileva triaged this task as Medium priority.Nov 7 2017, 12:26 PM
ovasileva moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
Tbayer renamed this task from Determine expected amount of usage of print to PDF button per browser to Determine expected amount of usage of mobile print to PDF button per browser.Nov 10 2017, 4:07 AM
Tbayer claimed this task.
Tbayer updated the task description. (Show Details)

@Tbayer: Can we confirm that the Print events with event_skin = 'minerva' skin are coming from the mobile domain? I ask because it'd be interesting to see if users were printing the mobile site (and by proxy from a mobile device?) prior to us launching the print button.

Jdlrobson changed the task status from Stalled to Open.Nov 16 2017, 12:19 AM
Jdlrobson added a subscriber: Jdlrobson.

The print button is live (T179914) so unstalling.

@Tbayer: Can we confirm that the Print events with event_skin = 'minerva' skin are coming from the mobile domain? I ask because it'd be interesting to see if users were printing the mobile site (and by proxy from a mobile device?) prior to us launching the print button.

Yes, they do, at a rate of virtually 100% (checked in case of English Wikipedia, see below). I've seen the concern that Minerva must no longer be called a mobile skin because it can be used on desktop domains too, but so far it seems to be a rather theoretical one.

SELECT DATE(timestamp) AS date,
SUM( IF(webhost = 'en.m.wikipedia.org', 1, 0)) / SUM(1) AS mobile_domain_pc,
SUM( IF(webhost = 'en.wikipedia.org', 1, 0)) / SUM(1) AS desktop_domain_pc,
SUM(1) AS all_events 
FROM log.Print_17199246 
WHERE wiki = 'enwiki'
AND userAgent LIKE "%Chrome%" AND userAgent NOT LIKE "%iOS%" 
AND event_skin = 'minerva' 
GROUP BY date ORDER BY date;

+------------+------------------+-------------------+------------+
| date       | mobile_domain_pc | desktop_domain_pc | all_events |
+------------+------------------+-------------------+------------+
| 2017-09-21 |           0.8571 |            0.1429 |          7 |
| 2017-09-22 |           1.0000 |            0.0000 |        169 |
| 2017-09-23 |           1.0000 |            0.0000 |        164 |
| 2017-09-24 |           1.0000 |            0.0000 |        147 |
| 2017-09-25 |           1.0000 |            0.0000 |        169 |
| 2017-09-26 |           1.0000 |            0.0000 |        178 |
| 2017-09-27 |           1.0000 |            0.0000 |        195 |
| 2017-09-28 |           1.0000 |            0.0000 |        148 |
| 2017-09-29 |           1.0000 |            0.0000 |        258 |
| 2017-09-30 |           1.0000 |            0.0000 |        267 |
| 2017-10-01 |           1.0000 |            0.0000 |        279 |
| 2017-10-02 |           1.0000 |            0.0000 |        349 |
| 2017-10-03 |           1.0000 |            0.0000 |        348 |
| 2017-10-04 |           1.0000 |            0.0000 |        301 |
| 2017-10-05 |           1.0000 |            0.0000 |        337 |
| 2017-10-06 |           1.0000 |            0.0000 |        282 |
| 2017-10-07 |           1.0000 |            0.0000 |        321 |
| 2017-10-08 |           1.0000 |            0.0000 |        292 |
| 2017-10-09 |           1.0000 |            0.0000 |        344 |
| 2017-10-10 |           1.0000 |            0.0000 |        288 |
| 2017-10-11 |           1.0000 |            0.0000 |        336 |
| 2017-10-12 |           1.0000 |            0.0000 |        364 |
| 2017-10-13 |           1.0000 |            0.0000 |        297 |
| 2017-10-14 |           1.0000 |            0.0000 |        275 |
| 2017-10-15 |           1.0000 |            0.0000 |        277 |
| 2017-10-16 |           1.0000 |            0.0000 |        299 |
| 2017-10-17 |           1.0000 |            0.0000 |        299 |
| 2017-10-18 |           1.0000 |            0.0000 |        290 |
| 2017-10-19 |           1.0000 |            0.0000 |        321 |
| 2017-10-20 |           1.0000 |            0.0000 |        324 |
| 2017-10-21 |           1.0000 |            0.0000 |        292 |
| 2017-10-22 |           1.0000 |            0.0000 |        319 |
| 2017-10-23 |           1.0000 |            0.0000 |        411 |
| 2017-10-24 |           1.0000 |            0.0000 |        341 |
| 2017-10-25 |           1.0000 |            0.0000 |        399 |
| 2017-10-26 |           1.0000 |            0.0000 |        302 |
| 2017-10-27 |           1.0000 |            0.0000 |        313 |
| 2017-10-28 |           1.0000 |            0.0000 |        279 |
| 2017-10-29 |           1.0000 |            0.0000 |        300 |
| 2017-10-30 |           1.0000 |            0.0000 |        314 |
| 2017-10-31 |           1.0000 |            0.0000 |        291 |
| 2017-11-01 |           1.0000 |            0.0000 |        316 |
| 2017-11-02 |           1.0000 |            0.0000 |        340 |
| 2017-11-03 |           1.0000 |            0.0000 |        321 |
| 2017-11-04 |           1.0000 |            0.0000 |        363 |
| 2017-11-05 |           1.0000 |            0.0000 |        412 |
| 2017-11-06 |           1.0000 |            0.0000 |        331 |
| 2017-11-07 |           1.0000 |            0.0000 |        284 |
| 2017-11-08 |           1.0000 |            0.0000 |        351 |
| 2017-11-09 |           0.9971 |            0.0000 |        349 |
| 2017-11-10 |           0.9965 |            0.0000 |        286 |
| 2017-11-11 |           1.0000 |            0.0000 |        291 |
| 2017-11-12 |           1.0000 |            0.0000 |        278 |
| 2017-11-13 |           1.0000 |            0.0000 |        291 |
| 2017-11-14 |           0.9971 |            0.0000 |        346 |
| 2017-11-15 |           1.0000 |            0.0000 |        401 |
| 2017-11-16 |           0.9989 |            0.0000 |       1855 |
| 2017-11-17 |           1.0000 |            0.0000 |       2901 |
| 2017-11-18 |           0.9994 |            0.0000 |       3620 |
| 2017-11-19 |           1.0000 |            0.0000 |       4598 |
| 2017-11-20 |           1.0000 |            0.0000 |       4434 |
| 2017-11-21 |           1.0000 |            0.0000 |       3616 |
+------------+------------------+-------------------+------------+
62 rows in set (4.41 sec)

^ Reflecting that T181297: Instrument print to PDF button is a direct subtask (a blocker).

Just curious: do we care about Maxthon and Dolphin? I don't see it mentioned in our compatibility matrix which I understand to mean that we explicitly don't support it.

Here is a chart of PDF downloads per day (we already used this data last month in the quarterly check-in):

Daily PDF downloads on mobile web, Feb-May 2018.png (1×1 px, 146 KB)

The measured rate was a bit higher in late January/early February while we were still working on the instrumentation (see detailed data below), I haven't researched what exactly happened there, but the numbers charted below should be more reliable.

NB: strictly speaking we would need to sample by pageview instead of by session for this question, but due to the generally low average number of pageviews per session, we'll assume that the difference is small enough not to matter here.

Data via:

SELECT year, month, day, CONCAT(year,'-',LPAD(month,2,'0'),'-',LPAD(day,2,'0')) AS date,
SUM(IF(event.action = 'shownPrintButton', 1, 0)) AS buttons_shown,
SUM(IF(event.action = 'clickPrintableVersion', 1, 0)) AS buttons_clicked,
SUM(IF(event.action = 'onBeforePrint', 1, 0)) AS onBeforePrints
FROM event.print
WHERE year = 2018 AND month <= 5
AND event.skin = 'minerva'
GROUP BY year, month, day
ORDER BY year, month, day LIMIT 100000;

year	month	day	date	buttons_shown	buttons_clicked	onbeforeprints
2018	1	1	2018-01-01	0	0	11156
2018	1	2	2018-01-02	0	0	13211
2018	1	3	2018-01-03	0	0	13175
2018	1	4	2018-01-04	0	0	13070
2018	1	5	2018-01-05	0	0	12635
2018	1	6	2018-01-06	0	0	12595
2018	1	7	2018-01-07	0	0	13824
2018	1	8	2018-01-08	0	0	14081
2018	1	9	2018-01-09	0	0	14691
2018	1	10	2018-01-10	0	0	14524
2018	1	11	2018-01-11	0	0	15224
2018	1	12	2018-01-12	0	0	13482
2018	1	13	2018-01-13	0	0	12609
2018	1	14	2018-01-14	0	0	14037
2018	1	15	2018-01-15	0	0	14887
2018	1	16	2018-01-16	1	0	15451
2018	1	17	2018-01-17	28545	112	15579
2018	1	18	2018-01-18	2025909	3388	15336
2018	1	19	2018-01-19	11191567	22485	16113
2018	1	20	2018-01-20	12562574	21613	15125
2018	1	21	2018-01-21	14209475	24772	18090
2018	1	22	2018-01-22	12209739	24867	17392
2018	1	23	2018-01-23	11916868	25115	17659
2018	1	24	2018-01-24	11761328	25445	17902
2018	1	25	2018-01-25	11524628	23918	16918
2018	1	26	2018-01-26	5642926	8451	6183
2018	1	27	2018-01-27	12744825	21060	15015
2018	1	28	2018-01-28	14469059	23742	17183
2018	1	29	2018-01-29	12268977	24740	17699
2018	1	30	2018-01-30	11673428	24776	17774
2018	1	31	2018-01-31	11529791	24766	17423
2018	2	1	2018-02-01	11240288	24488	17258
2018	2	2	2018-02-02	11198327	22079	15741
2018	2	3	2018-02-03	12571491	21682	15335
2018	2	4	2018-02-04	14091754	23315	16689
2018	2	5	2018-02-05	12314997	24820	17337
2018	2	6	2018-02-06	11793820	26342	18473
2018	2	7	2018-02-07	11705570	26446	18745
2018	2	8	2018-02-08	11512750	25879	17858
2018	2	9	2018-02-09	11037912	21289	15417
2018	2	10	2018-02-10	11300094	15852	13995
2018	2	11	2018-02-11	12748641	18442	16368
2018	2	12	2018-02-12	11083914	17761	16280
2018	2	13	2018-02-13	10669878	18906	17023
2018	2	14	2018-02-14	10340395	17342	15558
2018	2	15	2018-02-15	10283097	17363	15588
2018	2	16	2018-02-16	10282107	17062	15370
2018	2	17	2018-02-17	11444329	16363	14334
2018	2	18	2018-02-18	12826372	18141	16512
2018	2	19	2018-02-19	11503395	19123	16969
2018	2	20	2018-02-20	10999568	20245	17807
2018	2	21	2018-02-21	10811166	19419	17216
2018	2	22	2018-02-22	10478538	18828	16853
2018	2	23	2018-02-23	10315039	16814	15203
2018	2	24	2018-02-24	11368947	15990	14842
2018	2	25	2018-02-25	13320643	18489	16791
2018	2	26	2018-02-26	11083707	18567	16841
2018	2	27	2018-02-27	10584546	19692	17231
2018	2	28	2018-02-28	10450640	18587	16447
2018	3	1	2018-03-01	10253092	17024	15485
2018	3	2	2018-03-02	10122749	15801	14318
2018	3	3	2018-03-03	11368252	16344	14894
2018	3	4	2018-03-04	12841281	18184	16498
2018	3	5	2018-03-05	11468864	18499	16723
2018	3	6	2018-03-06	10666904	19368	17511
2018	3	7	2018-03-07	10441429	19204	16854
2018	3	8	2018-03-08	10307185	18131	16490
2018	3	9	2018-03-09	10225768	16566	15044
2018	3	10	2018-03-10	11178341	16402	14989
2018	3	11	2018-03-11	12689206	18081	16528
2018	3	12	2018-03-12	10951569	18595	17210
2018	3	13	2018-03-13	10753175	20275	17867
2018	3	14	2018-03-14	11383661	20355	18543
2018	3	15	2018-03-15	10608095	18715	17084
2018	3	16	2018-03-16	10276364	16926	15348
2018	3	17	2018-03-17	11396484	15552	14243
2018	3	18	2018-03-18	12650172	17370	16233
2018	3	19	2018-03-19	10848365	18143	16715
2018	3	20	2018-03-20	10556674	18402	16809
2018	3	21	2018-03-21	10712099	18871	16980
2018	3	22	2018-03-22	10396668	17582	16081
2018	3	23	2018-03-23	10092787	15816	14473
2018	3	24	2018-03-24	11034074	14543	13279
2018	3	25	2018-03-25	12147723	16081	14902
2018	3	26	2018-03-26	10541711	16120	15041
2018	3	27	2018-03-27	10282189	16565	15051
2018	3	28	2018-03-28	9930551	15061	13718
2018	3	29	2018-03-29	9973035	14688	13665
2018	3	30	2018-03-30	10866195	14379	13255
2018	3	31	2018-03-31	11346498	13850	12712
2018	4	1	2018-04-01	12655688	15634	14544
2018	4	2	2018-04-02	11855895	16656	15308
2018	4	3	2018-04-03	10651635	17350	15900
2018	4	4	2018-04-04	10499341	17843	16359
2018	4	5	2018-04-05	10419232	17454	15917
2018	4	6	2018-04-06	10344377	15673	14440
2018	4	7	2018-04-07	11210697	14795	13655
2018	4	8	2018-04-08	12545114	17205	15928
2018	4	9	2018-04-09	11022571	17830	16519
2018	4	10	2018-04-10	10609765	18556	16995
2018	4	11	2018-04-11	10640635	18284	16764
2018	4	12	2018-04-12	10464193	17625	16421
2018	4	13	2018-04-13	10084321	15974	14867
2018	4	14	2018-04-14	11089790	15067	13568
2018	4	15	2018-04-15	12467415	16959	15798
2018	4	16	2018-04-16	10876132	18095	16635
2018	4	17	2018-04-17	10522832	17876	16454
2018	4	18	2018-04-18	10390618	17558	16100
2018	4	19	2018-04-19	10121828	17633	16517
2018	4	20	2018-04-20	10093217	15558	14249
2018	4	21	2018-04-21	11007632	14326	13276
2018	4	22	2018-04-22	12280959	16164	15215
2018	4	23	2018-04-23	10866755	17656	16483
2018	4	24	2018-04-24	10817883	18227	16769
2018	4	25	2018-04-25	10792189	17668	16596
2018	4	26	2018-04-26	10316816	17030	15867
2018	4	27	2018-04-27	10079149	15405	14323
2018	4	28	2018-04-28	10721695	13927	12940
2018	4	29	2018-04-29	11949355	15389	14237
2018	4	30	2018-04-30	10720601	15232	14031
2018	5	1	2018-05-01	11485449	16555	15460
2018	5	2	2018-05-02	10642897	17476	16111
2018	5	3	2018-05-03	10609206	17322	15945
2018	5	4	2018-05-04	10305202	15522	14884
2018	5	5	2018-05-05	10975012	14915	13709
2018	5	6	2018-05-06	12143748	16863	15493
2018	5	7	2018-05-07	10943325	17275	16086
2018	5	8	2018-05-08	10917122	17847	16556
2018	5	9	2018-05-09	10669792	17392	16007
2018	5	10	2018-05-10	11063453	17167	15872
2018	5	11	2018-05-11	10428345	15916	14587
2018	5	12	2018-05-12	11474839	14582	13824
2018	5	13	2018-05-13	12589979	15842	14694
2018	5	14	2018-05-14	11138235	17222	16046
2018	5	15	2018-05-15	11005096	18414	17071
2018	5	16	2018-05-16	10928355	17203	15979
2018	5	17	2018-05-17	10796385	17700	16518
2018	5	18	2018-05-18	10578085	16340	15139
2018	5	19	2018-05-19	13203435	16934	14128
2018	5	20	2018-05-20	13973694	17421	16133
2018	5	21	2018-05-21	12484428	18078	16726
2018	5	22	2018-05-22	11436520	18403	16920
2018	5	23	2018-05-23	11128251	18478	16650
2018	5	24	2018-05-24	10699916	17333	16209
2018	5	25	2018-05-25	10315265	15196	14223
2018	5	26	2018-05-26	11593183	15391	14220
2018	5	27	2018-05-27	12765854	16593	15383
2018	5	28	2018-05-28	11706061	17278	15996
2018	5	29	2018-05-29	11194107	18360	16681
2018	5	30	2018-05-30	10720826	18283	16209
2018	5	31	2018-05-31	10817308	17539	16303
151 rows selected (397.633 seconds)

It looks like the last AC has yet to be met.

Here is the answer to the third question from the task description:

rank in mobile web viewsbrowserexpected PDF clicks per day
7Firefox Mobile2593.957217
8Opera Mini2577.688826
9UC Browser2373.786172
12Opera Mobile871.741100
42Maxthon4.155490
262Dolphin0.005788

Or to be precise, Dolphin comes in several variants:

rank in mobile web viewsbrowserexpected PDF clicks per day
176DolphiniPad0.019259
262Dolphin0.005788
349DolphiniPhone_Pro0.002305
443DolphiniPhone0.001229
485DolphiniPhone_JP0.000973
604DolphiniPad_ZH0.000461
950DolphiniPhone_ZH0.000102
1056DolphiniPad_JP0.000051

This is based on the overall click rate for Chrome(-like) browsers from February 10-September 15, 2018 namely around 0.0015365 clicks/pageview, and extrapolated from the mobile web pageviews per browser for September 2018 (the mobile domain pageviews being an approximation for Minerva views where this button will be shown).

Let me know in case there are followup questions (I understand the work on this software feature is currently still blocked on other things, anyway).

In particular, I don't quite recall the reason for focusing on these particular browsers and not including others with a larger share of mobile views, such as mobile Safari or the stock Android browser (see also @Niedzielski's question above).

Data via

SELECT year, month, day, CONCAT(year,'-',LPAD(month,2,'0'),'-',LPAD(day,2,'0')) AS date,
SUM(IF(event.action = 'shownPrintButton', 1, 0)) AS buttons_shown,
SUM(IF(event.action = 'clickPrintableVersion', 1, 0)) AS buttons_clicked,
SUM(IF(event.action = 'onBeforePrint', 1, 0)) AS onBeforePrints
FROM event.print
WHERE year = 2018
AND event.skin = 'minerva'
GROUP BY year, month, day
ORDER BY year, month, day LIMIT 100000;


SELECT user_agent_map['browser_family'] AS browser,
SUM(view_count) AS views
FROM wmf.pageview_hourly
WHERE year = 2018 AND month = 9 
AND agent_type = 'user'
AND access_method = 'mobile web'
GROUP BY user_agent_map['browser_family']
ORDER BY views DESC LIMIT 100000;

@pmiazga - fyi. It seems the rates are low enough to where the extra load from mobile will be fairly minimal.

Do we need anything else here, or can this task be closed?

Should we unstall T196159 and bring it into the kanbanana?

Closing now as all the AC have been met as written. (I could imagine further uses of this data beyond these questions, but they are probably not a priority right now.)