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
description | "Viewport size data." |
---|
properties | country | type | "string" |
---|
description | "Client's country (per geolocation)" |
---|
|
---|
isHttps | type | "boolean" |
---|
required | true |
---|
description | "Whether the content was loaded over https or not" |
---|
|
---|
isAnon | type | "boolean" |
---|
required | true |
---|
description | "Whether the user is logged in or not" |
---|
|
---|
samplingFactor | type | "integer" |
---|
required | true |
---|
description | "Sampling factor" |
---|
|
---|
type | type | "string" |
---|
required | true |
---|
description | "Type that allows differenciating measurements made for different projects" |
---|
|
---|
viewportWidth | type | "integer" |
---|
required | true |
---|
description | "The viewport's width" |
---|
|
---|
viewportHeight | type | "integer" |
---|
required | true |
---|
description | "The viewport's height" |
---|
|
---|
|
---|