Schema:ViewportMetrics

PHP logging

EventLogging::logEvent( 'ViewportMetrics', 10536808, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"ViewportMetrics": 10536808
			}
		}
	}
}

JavaScript logging

mw.track( 'event.ViewportMetrics', { /* ... */ } );
From Meta, a Wikimedia project coordination wiki
Revision 10536808
description"Viewport size data."
properties
country
type"string"
description"Client's country (per geolocation)"
isHttps
type"boolean"
requiredtrue
description"Whether the content was loaded over https or not"
isAnon
type"boolean"
requiredtrue
description"Whether the user is logged in or not"
samplingFactor
type"integer"
requiredtrue
description"Sampling factor"
type
type"string"
requiredtrue
description"Type that allows differenciating measurements made for different projects"
viewportWidth
type"integer"
requiredtrue
description"The viewport's width"
viewportHeight
type"integer"
requiredtrue
description"The viewport's height"