Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
title | "analytics/product_metrics/web/base" |
---|
description | "" |
---|
$id | "/analytics/product_metrics/web/base/1.3.0" |
---|
$schema | "https://json-schema.org/draft-07/schema#" |
---|
type | "object" |
---|
additionalProperties | false |
---|
required | "$schema" |
"action" |
"agent" |
"meta" |
|
---|
properties | $schema | description | "A URI identifying the JSONSchema for this event. This should match an schema's $id in a schema repository. E.g. /schema/title/1.0.0
" |
---|
type | "string" |
---|
|
---|
action | description | "The type of the action.
The type is expected to be human-readable and controlled by the team(s)
that author and/or maintain the analytics instrument." |
---|
type | "string" |
---|
maxLength | 64 |
---|
|
---|
action_context | description | "Supporting context for the action, if any." |
---|
type | "string" |
---|
maxLength | 8192 |
---|
|
---|
action_source | description | "The friendly name of the source of the action." |
---|
type | "string" |
---|
maxLength | 64 |
---|
|
---|
action_subtype | description | "The subtype or secondary type of the action.
The subtype can be used to subdivide the action, e.g. when an error
occurs, `action` would be `"error"` and `action_subtype` would be one of
a set of values that describe the various errors that the analytics
instrument tracks.
The subtype is expected to be human-readable and controlled by the
team(s) that author and/or maintain the analytics instrument." |
---|
type | "string" |
---|
maxLength | 64 |
---|
|
---|
agent | description | "Information related to the Metrics Platform client - the agent
responsible for logging the event." |
---|
type | "object" |
---|
additionalProperties | false |
---|
properties | client_platform | description | "The client platform on which the event was produced." |
---|
type | "string" |
---|
enum | "mediawiki_php" |
"mediawiki_js" |
"kaios" |
"android" |
"ios" |
|
---|
|
---|
client_platform_family | description | "The family of the client platform on which which the event was
produced." |
---|
type | "string" |
---|
enum | "mobile_browser" |
"desktop_browser" |
"app" |
|
---|
|
---|
release_status | description | "The client platform status." |
---|
type | "string" |
---|
enum | |
---|
|
---|
|
---|
|
---|
dt | description | "ISO-8601 formatted timestamp of when the event occurred/was generated in UTC). This exists separately from meta.dt in the main common schema. For external client-sent instrumentation events, we want to allow meta.dt to be the received time (filled in by EventGate at ingest time), as we don't trust client-sent events to always set the proper date and time. Client-set event generation time should be set here instead. See: https://phabricator.wikimedia.org/T240460
" |
---|
type | "string" |
---|
format | "date-time" |
---|
maxLength | 128 |
---|
|
---|
element_friendly_name | description | "The friendly name of the UI element that was clicked.
The friendly name is expected to be human-readable and controlled by the
team(s) that author and/or maintain the analytics instrument." |
---|
type | "string" |
---|
maxLength | 64 |
---|
|
---|
element_id | description | "The ID of the UI element that was clicked." |
---|
type | "string" |
---|
maxLength | 64 |
---|
|
---|
experiments | description | "Details of all experiments that the subject is currently enrolled in" |
---|
type | "object" |
---|
properties | assigned | description | "Which experiment groups (variants) the subject has been assigned to:
- The key is the experiment name present in the enrolled array
- The value is the assigned experiment group (variant)" |
---|
type | "object" |
---|
additionalProperties | |
---|
|
---|
enrolled | description | "Names of all experiments that the subject is currently enrolled in" |
---|
type | "array" |
---|
items | |
---|
|
---|
|
---|
|
---|
funnel_entry_token | description | "The token used to determine whether the performer could enter the funnel,
if any.
The token could be automatically generated by the Metrics Platform
Client. It could also be the pageview (retrieved from
`mw.user.getPageviewToken()`) or the session token (retrieved from
`mw.user.sessionId()`)." |
---|
type | "string" |
---|
maxLength | 80 |
---|
|
---|
funnel_event_sequence_position | description | "The position of the event in the sequence of events submitted during the
funnel, if any." |
---|
type | "integer" |
---|
maximum | 9007199254740991 |
---|
minimum | 1 |
---|
|
---|
funnel_name | description | "The name of the funnel that the performer has entered, if any." |
---|
type | "string" |
---|
maxLength | 64 |
---|
|
---|
http | type | "object" |
---|
properties | has_cookies | description | "True if the http request has any cookies set" |
---|
type | "boolean" |
---|
|
---|
method | description | "The HTTP request method (GET, POST, etc.)" |
---|
type | "string" |
---|
|
---|
protocol | description | "The protocol used for the request (HTTP or HTTPS)" |
---|
type | "string" |
---|
|
---|
request_headers | description | "Request headers sent by the client. E.g. user-agent, etc." |
---|
type | "object" |
---|
additionalProperties | |
---|
|
---|
response_headers | description | "Response headers sent back to the client (when known)." |
---|
type | "object" |
---|
additionalProperties | |
---|
|
---|
status_code | description | "The HTTP status code returned for this request (when known)" |
---|
type | "integer" |
---|
maximum | 9007199254740991 |
---|
minimum | -9007199254740991 |
---|
|
---|
|
---|
|
---|
instrument_name | description | "The unique identifier to distinguish instruments for filtering." |
---|
type | "string" |
---|
maxLength | 255 |
---|
|
---|
mediawiki | description | "Information related to the MediaWiki instance that the user is
accessing." |
---|
type | "object" |
---|
additionalProperties | false |
---|
properties | database | description | "The name of the database used by the MediaWiki instance.
See https://www.mediawiki.org/wiki/Manual:$wgDBname" |
---|
type | "string" |
---|
|
---|
site_content_language | description | "The site content language, formatted as a language code.
See
* https://www.mediawiki.org/wiki/Manual:Language
* https://meta.wikimedia.org/wiki/Language_codes
* https://www.mediawiki.org/wiki/Manual:Language#Language_code" |
---|
type | "string" |
---|
maxLength | 255 |
---|
minLength | 1 |
---|
|
---|
site_content_language_variant | description | "The site content language variant, formatted as a language code.
See
* https://www.mediawiki.org/wiki/Manual:Language
* https://meta.wikimedia.org/wiki/Language_codes
* https://www.mediawiki.org/wiki/Manual:Language#Language_code" |
---|
type | "string" |
---|
maxLength | 255 |
---|
minLength | 1 |
---|
|
---|
skin | description | "MediaWiki skin (e.g. "vector") at the time of the event." |
---|
type | "string" |
---|
minLength | 1 |
---|
|
---|
version | description | "MediaWiki version at the time of the event, e.g "1.38.0-wmf.18"." |
---|
type | "string" |
---|
|
---|
|
---|
|
---|
meta | type | "object" |
---|
required | |
---|
properties | domain | description | "Domain the event or entity pertains to" |
---|
type | "string" |
---|
minLength | 1 |
---|
|
---|
dt | description | "UTC event datetime, in ISO-8601 format" |
---|
type | "string" |
---|
format | "date-time" |
---|
maxLength | 128 |
---|
|
---|
id | description | "Unique ID of this event" |
---|
type | "string" |
---|
|
---|
request_id | description | "Unique ID of the request that caused the event" |
---|
type | "string" |
---|
|
---|
stream | description | "Name of the stream/queue/dataset that this event belongs in" |
---|
type | "string" |
---|
minLength | 1 |
---|
|
---|
uri | description | "Unique URI identifying the event or entity" |
---|
type | "string" |
---|
format | "uri-reference" |
---|
maxLength | 8192 |
---|
|
---|
|
---|
|
---|
page | description | "Information about the current page" |
---|
type | "object" |
---|
additionalProperties | false |
---|
properties | title | description | "The MediaWiki page title, with the namespace prefix removed
and with spaces replaced by underscores, e.g. "Talk:Foo Bar"
becomes "Foo_Bar"
See https://www.mediawiki.org/wiki/Manual:Page_title and
https://www.mediawiki.org/wiki/Manual:Page_table#page_title" |
---|
type | "string" |
---|
minLength | 1 |
---|
|
---|
content_language | description | "The language of the page content, formatted as a language code.
Semantics to be documented as the "page content language algorithm".
See
* https://www.mediawiki.org/wiki/Manual:Language
* https://meta.wikimedia.org/wiki/Language_codes
* https://www.mediawiki.org/wiki/Manual:Language#Language_code" |
---|
type | "string" |
---|
maxLength | 255 |
---|
minLength | 1 |
---|
|
---|
id | description | "Unique identifier assigned to a MediaWiki page when it is created.
The identifier remains the same across edits, renames, and moves.
It may change if the page is deleted and then restored, however.
See https://www.mediawiki.org/wiki/Manual:Page_table#page_id" |
---|
type | "integer" |
---|
maximum | 9007199254740991 |
---|
minimum | -1 |
---|
|
---|
is_redirect | description | "Whether the MediaWiki page is a redirect or not at the time of the
event. A page is considered a redirect if it starts with
#REDIRECT [[pagename]]
Note well that this state is also stored on the Mediawiki page
table.
See
* https://www.mediawiki.org/wiki/Help:Redirects
* https://www.mediawiki.org/wiki/Manual:Page_table#page_is_redirect" |
---|
type | "boolean" |
---|
|
---|
namespace_id | description | "The ID of the namespace that the page is in.
See
* https://www.mediawiki.org/wiki/Manual:Namespace
* https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces" |
---|
type | "integer" |
---|
maximum | 9007199254740991 |
---|
minimum | -9007199254740991 |
---|
|
---|
namespace_name | description | "The canonical (English) name of the namespace that the page is
in.
Namespace names can be translated and translatable aliases can
be created for them in the MediaWiki configuration. MediaWiki
Core defines the canonical name for a namespace as the English
one.
See
* https://www.mediawiki.org/wiki/Manual:Namespace and
* https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces" |
---|
type | "string" |
---|
minLength | 0 |
---|
|
---|
revision_id | description | "The head revision ID of the page at the time of the event." |
---|
type | "integer" |
---|
maximum | 9007199254740991 |
---|
minimum | 0 |
---|
|
---|
user_groups_allowed_to_edit | description | "User groups with permission to edit the page at the time of the event.
This will be an empty array if any user is allowed to edit the page." |
---|
type | "array" |
---|
items | |
---|
|
---|
user_groups_allowed_to_move | description | "User groups with permission to move the page at the time of the event.
This will be an empty array if any user is allowed to move the page." |
---|
type | "array" |
---|
items | |
---|
|
---|
wikidata_qid | description | "Wikibase item ID corresponding to the page at the time of the event.
See https://www.wikidata.org/wiki/Wikidata:Identifiers" |
---|
type | "string" |
---|
|
---|
|
---|
|
---|
performer | description | "Information about the user accessing the content and/or performing
the action, often referred to as the actor or the "global user" in
MediaWiki Core, extensions, and skins.
For context about the use of "performer" rather than "actor", see
https://phabricator.wikimedia.org/T167246#5093402 onwards." |
---|
type | "object" |
---|
additionalProperties | false |
---|
properties | active_browsing_session_token | description | "A token that represents a cluster of user activity that ends
after 30 minutes of inactivity.
It's a random unique ID for the user's current activity session
on each domain (not project)." |
---|
type | "string" |
---|
maxLength | 20 |
---|
minLength | 20 |
---|
pattern | "^[0-9a-z]{20}$" |
---|
|
---|
can_probably_edit_page | description | "True if the current page at the time of the event is editable by
the user, given the user and page's permissions.
User must be be logged in for attribute to appear.
TODO: Semantics to be documented as the "user can probably edit
page algorithm"" |
---|
type | "boolean" |
---|
|
---|
edit_count | description | "Number of edits that the user has performed at the time of the
event.
User must be be logged in for attribute to appear." |
---|
type | "integer" |
---|
maximum | 9007199254740991 |
---|
minimum | 0 |
---|
|
---|
edit_count_bucket | description | "The number of edits that the user has performed at the time of
the event placed into one five low-granularity buckets.
User must be be logged in for attribute to appear." |
---|
type | "string" |
---|
enum | "0 edits" |
"1-4 edits" |
"5-99 edits" |
"100-999 edits" |
"1000+ edits" |
|
---|
|
---|
groups | description | "Groups that the user is in at the time of the event." |
---|
type | "array" |
---|
items | |
---|
|
---|
id | description | "The ID associated with the user account.
User must be be logged in for the property to appear." |
---|
type | "integer" |
---|
maximum | 9007199254740991 |
---|
minimum | -9007199254740991 |
---|
minLength | 1 |
---|
|
---|
is_bot | description | "Whether the user is considered a bot at the time of the event.
A user is considered a bot if they are in the "bot" group and
if they have the "bot" right." |
---|
type | "boolean" |
---|
|
---|
is_logged_in | description | "Whether the user is currently logged in." |
---|
type | "boolean" |
---|
|
---|
is_temp | description | "True if the user is an autocreated temporary MediaWiki user. This is used for IP masking.
" |
---|
type | "boolean" |
---|
|
---|
language | description | "The user's language at the time of the event, formatted as a
language code.
User must be logged in for attribute to appear.
See
- https://www.mediawiki.org/wiki/Manual:Language
- https://meta.wikimedia.org/wiki/Language_codes
- https://www.mediawiki.org/wiki/Manual:Language#Language_code" |
---|
type | "string" |
---|
maxLength | 255 |
---|
minLength | 1 |
---|
|
---|
language_variant | description | "The user's language variant at the time of the event, formatted
as a language code.
User must be logged in for attribute to appear.
See
- https://www.mediawiki.org/wiki/Manual:Language
- https://meta.wikimedia.org/wiki/Language_codes
- https://www.mediawiki.org/wiki/Manual:Language#Language_code
TODO: Documented how the user's language variant is determined." |
---|
type | "string" |
---|
maxLength | 255 |
---|
minLength | 1 |
---|
|
---|
name | description | "The username associated with the user account.
User must be be logged in for the property to appear." |
---|
type | "string" |
---|
|
---|
pageview_id | description | "Eighty uniform random bits formatted as a string of twenty
hexadecimal digits. Identifies a single pageview within a user
session." |
---|
type | "string" |
---|
maxLength | 20 |
---|
minLength | 20 |
---|
pattern | "^[0-9a-z]{20}$" |
---|
|
---|
registration_dt | description | "Datetime when the user account was registered.
User must be be logged in for attribute to appear." |
---|
type | "string" |
---|
format | "date-time" |
---|
maxLength | 128 |
---|
|
---|
session_id | description | "Eighty uniform random bits formatted as a string of twenty
hexadecimal digits. Identifies a single user session." |
---|
type | "string" |
---|
maxLength | 20 |
---|
minLength | 20 |
---|
pattern | "^[0-9a-z]{20}$" |
---|
|
---|
|
---|
|
---|
sample | description | "The sampling configuration of the stream at the time that the event was enqueued for submission. See https://phabricator.wikimedia.org/T310693 for more detail. In future, we may add a "custom" sample unit to represent sampling configuration being passed with the event at the time that was enqueued for submission (see https://phabricator.wikimedia.org/T312279)." |
---|
type | "object" |
---|
additionalProperties | false |
---|
properties | rate | type | "number" |
---|
maximum | 1 |
---|
minimum | 0 |
---|
|
---|
unit | type | "string" |
---|
enum | "pageview" |
"session" |
"device" |
|
---|
|
---|
|
---|
|
---|
|
---|
examples | $schema | "/analytics/product_metrics/web/base/1.3.0" |
---|
action | "dolor" |
---|
action_context | "dolor" |
---|
action_source | "dolor" |
---|
action_subtype | "dolor" |
---|
agent | client_platform | "mediawiki_php" |
---|
client_platform_family | "mobile_browser" |
---|
release_status | "prod" |
---|
|
---|
dt | "2021-01-01T00:00:00.0Z" |
---|
element_friendly_name | "dolor" |
---|
element_id | "dolor" |
---|
experiments | |
---|
funnel_entry_token | "dolor" |
---|
funnel_event_sequence_position | 1351079888211149 |
---|
funnel_name | "dolor" |
---|
http | has_cookies | false |
---|
method | "dolor" |
---|
protocol | "dolor" |
---|
request_headers | |
---|
response_headers | |
---|
status_code | -6305039478318694 |
---|
|
---|
instrument_name | "dolor" |
---|
mediawiki | database | "dolor" |
---|
site_content_language | "dolor" |
---|
site_content_language_variant | "dolor" |
---|
skin | "dolor" |
---|
version | "dolor" |
---|
|
---|
meta | domain | "dolor" |
---|
dt | "2021-01-01T00:00:00.0Z" |
---|
id | "dolor" |
---|
request_id | "dolor" |
---|
stream | "dolor" |
---|
uri | "http://example.org" |
---|
|
---|
page | title | "dolor" |
---|
content_language | "dolor" |
---|
id | 1351079888211147 |
---|
is_redirect | false |
---|
namespace_id | -6305039478318694 |
---|
namespace_name | "dolor" |
---|
revision_id | 1351079888211148 |
---|
user_groups_allowed_to_edit | |
---|
user_groups_allowed_to_move | |
---|
wikidata_qid | "dolor" |
---|
|
---|
performer | active_browsing_session_token | "55555555555555555555" |
---|
can_probably_edit_page | false |
---|
edit_count | 1351079888211148 |
---|
edit_count_bucket | "0 edits" |
---|
groups | |
---|
id | -6305039478318694 |
---|
is_bot | false |
---|
is_logged_in | false |
---|
is_temp | false |
---|
language | "dolor" |
---|
language_variant | "dolor" |
---|
name | "dolor" |
---|
pageview_id | "55555555555555555555" |
---|
registration_dt | "2021-01-01T00:00:00.0Z" |
---|
session_id | "55555555555555555555" |
---|
|
---|
sample | |
---|
|
|
---|