Do people prefer to read Wikipedia (or Wiktionary) in portrait or in landscape views?
Do we have data on this?
If this is not the correct location to ask, I would appreciate if you could let me know where /whom to ask.
The question is relevant to a discussion in el-wiktionary, where we are arguing whether to include info about sister projects in line or in a box (taking possible too much space in mobile view).
Description
Event Timeline
Hi,
We had to ask around a little, and unfortunately we don't have a precise answer as we don't really instrument device orientation directly. However, we do instrument device viewport width (aggregated to buckets) for mobile web page views and keep it for 90 days, and I think that can help give you an approximate answer.
As far as I can tell, most phones in portrait mode will have <720px viewport width. If we naively apply that assumption across all devices, we get a query like:
SELECT probably_portrait, probably_landscape,
probably_portrait / (1.0 * probably_portrait + probably_landscape) AS portrait_ratio
FROM (
SELECT SUM(IF(viewport_size_bucket IN ('<320px', '320px-719px'), 1, 0)) AS probably_portrait,
SUM(IF(viewport_size_bucket IN ('<320px', '320px-719px'), 0, 1)) AS probably_landscape
FROM mediawiki_web_ui_actions
WHERE meta.domain IN ('el.wikipedia.org', 'el.wiktionary.org')
);Which tells me that ~80% of mobile web views for elwiki and elwiktionary come from portrait (<720px width) devices.
However, that assumption doesn't hold for tablet and non-desktop devices: for example, an iPad Pro will be larger than 720px in portrait mode. To refine the query a little, I tried to narrow it down to specific phone models (Pixel, iPhone and Samsung Galaxy released in the past 3-4 years). We can reasonably identify them by user agent and they should be <720px wide in portrait mode. So, with a query like:
SELECT probably_portrait, probably_landscape,
probably_portrait / (1.0 * probably_portrait + probably_landscape) AS portrait_ratio
FROM (
SELECT SUM(IF(viewport_size_bucket IN ('<320px', '320px-719px'), 1, 0)) AS probably_portrait,
SUM(IF(viewport_size_bucket IN ('<320px', '320px-719px'), 0, 1)) AS probably_landscape
FROM mediawiki_web_ui_actions
WHERE meta.domain IN ('el.wikipedia.org', 'el.wiktionary.org')
AND (
-- Source for user agents: https://deviceatlas.com/blog/list-of-user-agent-strings
-- Source for viewport sizes: https://blisk.io/devices
-- Apple iPhone 16e (390 x 844)
http.request_headers['user-agent'] LIKE '%iPhone17,5%' OR
-- Apple iPhone 16 Pro (402 x 874)
http.request_headers['user-agent'] LIKE '%iPhone17,1%' OR
-- Apple iPhone 16 Pro Max (440 x 956)
http.request_headers['user-agent'] LIKE '%iPhone17,2%' OR
-- Apple iPhone 16 (393 x 852)
http.request_headers['user-agent'] LIKE '%iPhone17,3%' OR
-- Apple iPhone 16 Plus (430 x 932)
http.request_headers['user-agent'] LIKE '%iPhone17,4%' OR
-- Apple iPhone 15 Pro (393 x 852)
http.request_headers['user-agent'] LIKE '%iPhone16,2%' OR
-- Apple iPhone 14 (390 x 844)
http.request_headers['user-agent'] LIKE '%iPhone14,7%' OR
-- Apple iPhone 13 Pro (390 x 844)
http.request_headers['user-agent'] LIKE '%iPhone14,2%' OR
-- Pixel 6 (412 x 915)
http.request_headers['user-agent'] LIKE '%Pixel 6%' OR
-- Pixel 7 (412 x 915)
http.request_headers['user-agent'] LIKE '%Pixel 7%' OR
-- Pixel 8 (412 x 915)
http.request_headers['user-agent'] LIKE '%Pixel 8%' OR
http.request_headers['user-agent'] LIKE '%Pixel 9%' OR
-- Samsung Galaxy S25
http.request_headers['user-agent'] LIKE '%SM-S931B%' OR
http.request_headers['user-agent'] LIKE '%SM-S931U%' OR
-- Samsung Galaxy S24 Ultra (384x 824)
http.request_headers['user-agent'] LIKE '%SM-S928B/DS%' OR
http.request_headers['user-agent'] LIKE '%SM-S928W%' OR
-- Samsung Galaxy S23 (360 x 780)
http.request_headers['user-agent'] LIKE '%SM-S911B%' OR
http.request_headers['user-agent'] LIKE '%SM-S911U%' OR
-- Samsung Galaxy S22 (360 x 780)
http.request_headers['user-agent'] LIKE '%SM-S901B%' OR
http.request_headers['user-agent'] LIKE '%SM-S901U%' OR
http.request_headers['user-agent'] LIKE '%SM-S908B%' OR
http.request_headers['user-agent'] LIKE '%SM-S908U%' OR
-- Samsung Galaxy S21 (360 x 800)
http.request_headers['user-agent'] LIKE '%SM-G991B%' OR
http.request_headers['user-agent'] LIKE '%SM-G991U%'
)
);It looks like the overwhelming majority (99.4%) of mobile web views were in portrait mode for those devices.
Does this help with the discussion?
Excellent approach dear GGoncalves-WMF!
Your first estimate is 80% portrait
and your second estimate is 99,4% of mobile web views were in portrait mode (for the most popular devices).
This is a (very) well documented answer.
Many thanks, I will inform the wikt-colleagues accordingly.