Schema:Popups

Revision 19411008
description"Detailed analytics for Page Previews. Events must only be sent for UAs supporting the Beacon API."
properties
pageTitleSource
type"string"
description"Will capture the title of the page the Hovercard is triggered on. For example, if user is in page X and hovers over link Y, the title will be X. Note: This will be logged for normal links when Hovercards are disabled."
requiredtrue
namespaceIdSource
type"integer"
requiredtrue
description"Namespace ID of source page X in the above example."
pageIdSource
type"integer"
requiredtrue
description"Page ID of source page X in the above example."
pageTitleHover
type"string"
description"Will capture the title corresponding to the link on which Hovercard was triggered on, Y in the above example. Note: This will be logged for normal links when Hovercards are disabled."
requiredfalse
namespaceIdHover
type"integer"
description"Namespace ID of destination page Y in the above example."
requiredfalse
isAnon
type"boolean"
description"Whether the user is anonymous or logged in"
requiredtrue
totalInteractionTime
requiredfalse
type"integer"
description"Total interaction time (in milliseconds) from the instant the link was dwelled upon until the instant a click or dismissal or abandonment (met dwelledButAbandoned threshold) was registered. This field is set in the same way for hovercards enabled and disabled."
action
type"string"
enum
"pageLoaded"
"dwelledButAbandoned"
"dismissed"
"opened"
"tapped settings cog"
"disabled"
"clickedReferencePreviewsContentLink"
"clickedGoToReferences"
description"`pageLoaded` happens once per page load. `dwelledButAbandoned` happens if user hovers over a (Hovercards-eligible) link for a minimum interaction time (defined in mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME), but abandons before the preview renders. All other values refer to actions taken after the popup was displayed. `opened` means the linked page was opened (whether in the same browser tab, a new tab in the same browser window, or a new browser window, and either by clicking on the original link or on the card). Note: These will also be logged for normal links when Hovercards are disabled (the action will never be dismissed in that case). `disabled` means the feature was explicitly disabled by the user (i.e., went from on to off). For that action, the following fields will be recorded: pageTitleSource, namespaceIdSource, pageIdSource, isAnon, popupEnabled, editCountBucket, previewCountBucket, pageToken, sessionToken. However, the tokens shouldn't be relied on as they aren't available on the server, from which the event is sent when a logged in user disables the feature. `clickedReferenceContentLink` happens when a link within a reference preview is clicked."
requiredtrue
hovercardsSuppressedByGadget
type"boolean"
description"Is the Navigation Popups gadget rather than the Popups extension being used to fetch and display article info?"
requiredtrue
popupEnabled
type"boolean"
description"Whether or not hovercards are enabled. We continue to log events even if the user disables it using the settings. Between Tuesday, 18th and Thursday, 3rd August 2017 the `disabled` events sent for anonymous users were sent with `popupEnabled = true` (see https://phabricator.wikimedia.org/T167365#3453171 onward). Note: This will always be logged."
requiredtrue
popupDelay
type"integer"
description"The popup delay (default/value set by user/value set by wiki's common.js). Not required if hovercards is disabled."
requiredfalse
perceivedWait
type"integer"
description"Amount of time (in milliseconds) between the instant the user started dwelling on a link and the instant the preview text rendered visibly, as determined strictly client-side. Not set if hovercards disabled."
requiredfalse
editCountBucket
type"string"
description"Number of edits by user. Set only if user is logged in."
enum
"0 edits"
"1-4 edits"
"5-99 edits"
"100-999 edits"
"1000+ edits"
requiredfalse
previewCountBucket
type"string"
enum
"0 previews"
"1-4 previews"
"5-20 previews"
"21+ previews"
"unknown"
description"Preview count bucket. Note: a corresponding LocalStorage variable is incremented upon a preview actually being shown (even when the user isn't sampled into event logging); the first time a user sees a preview, the value is `0 previews`. The value may be `unknown` if the device doesn't support localStorage."
requiredtrue
linkInteractionToken
type"string"
description"One-time token representing interaction with a link. Generated fresh for each link dwell, even successive dwells on the same link."
requiredfalse
pageToken
type"string"
description"One-time token per page load."
requiredtrue
sessionToken
type"string"
description"Session token that survives across pages (mw.user.sessionId()), but not browser restarts, used in deterministic user bucketing"
requiredtrue
previewType
type"string"
enum
"page"
"disambiguation"
"reference"
"generic"
description"Describes the type of Preview that is/was shown. Options are "page", "disambiguation", "reference", and "generic". Only present with the "dismissed" action."
requiredfalse
referencePreviewsEnabled
type"boolean"
description"Whether or not ReferencePreviews are enabled. We continue to log events even if the feature is disabled."
requiredfalse
scrollbarsPresent
type"boolean"
description"True when scrollbars are visible in the popup."
requiredfalse
version
requiredfalse
type"string"
description"Version of Hovercards that is in use. Will distinguish the current Hovercards version from subsequent versions with changed UX. (Only logged if popupEnabled = true)"
timestamp
requiredfalse
type"integer"
description"Timestamp, as reported by `window.performance.now()` (if available), sent along with all action types."