title: analytics/legacy/editattemptstep description: >- Logs generic events related to editing activity. All events are logged client-side, except that init, saveSuccess, and saveFailure events for the wikitext editor are logged server-side. $id: /analytics/legacy/editattemptstep/2.0.3 $schema: 'https://json-schema.org/draft-07/schema#' type: object allOf: - $ref: /fragment/analytics/legacy/eventcapsule/1.2.0 - $ref: /fragment/http/client_ip/1.0.0# - properties: event: properties: $ref: /fragment/analytics/web/2.0.0#/properties required: - event properties: event: type: object required: - version - action - editor_interface - mw_version - platform - integration - editing_session_id - user_id - user_editcount properties: abort_timing: description: >- Timing information about action=abort – time in milliseconds based on action.abort.type: preinit: Time since the editor was initialised nochange: Time since the editor was ready switchwith: Time since the editor was ready switchwithout: Time since the editor was ready abandon: Time since the editor was ready abandonMidsave: Time since the user initiated a saveAttempt. type: integer version: description: >- Version number. This field can be used to track changes in instrumentation that affect the nature of the data collected. type: integer action: type: string enum: - init - ready - loaded - firstChange - saveIntent - saveAttempt - saveSuccess - saveFailure - abort description: >- The actions involved in an attempt to edit a page: init: Initiation of the editor ready: Editor is ready for user input – 'cursor blinking' loaded: Editor has fully loaded firstChange: user has done something to edit the content, hopefully signaling intent-to-edit saveIntent: Editor pre-save button (if available) has been activated, showing user intent to save (regardless of whether they continue) saveAttempt: Editor save button has been activated, showing user attempt to save (regardless of success) saveSuccess: Editor has successfully saved and user has been shown a post-edit status on the client-side saveFailure: Editor has not successfully saved and user has been shown a save failure reason on the client-side abort: Editor has been aborted by user action. init_type: type: string enum: - page - section description: |- Type information about action=init page: Editing has been initiated for the whole page section: Editing has been initiated for a section of the page. init_mechanism: type: string enum: - click - new - url - url-new - click-sticky-header - click-new-sticky-header - new-sticky-header - url-sticky-header - url-new-sticky-header - tooslow description: >- Mechanism information about action=init click: Editing has been initiated from an edit link new: Editing has been initiated by clicking on redlink if type=page or new section link if type=section url: Editing has been initiated by direct navigation. url-new: Editing has been initiated by direct navigation to a non-existent page if type=page or a new section link if type=section tooslow: this editor was initialized as a fallback after the initially-chosen editor failed to load quickly enough. There should be an immediately-preceding init event with the same page_token / session_token. init_timing: description: >- Timing information about action=init – this is mostly not logged / logged as 0 because it's rarely meaningful. If a specific integration chooses to log this, it should document that here. type: integer ready_timing: description: >- Timing information about action=ready – time in milliseconds since the editor was initialised. type: integer loaded_timing: description: >- Timing information about action=loaded – time in milliseconds since the editor was initialised. type: integer first_change_timing: description: >- Timing information about action=firstChange – time in milliseconds since the editor was ready. type: integer save_intent_timing: description: >- Timing information about action=saveIntent – time in milliseconds since the editor was ready. type: integer save_attempt_timing: description: >- Timing information about action=saveAttempt – time in milliseconds since the user triggered saveIntent. type: integer save_success_timing: description: >- Timing information about action=saveSuccess – time in milliseconds spent by the system processing save (sum of two parts: saveIntent to saveReady, and saveAttempt to saveSuccess). type: integer save_failure_type: type: string enum: - userBadToken - userNewUser - extensionAbuseFilter - extensionCaptcha - extensionSpamBlacklist - extensionTitleBlacklist - responseEmpty - responseUnknown - editPageDeleted - editConflict description: >- Type information about action=saveFailure userBadToken: Save attempt failed because the user's token was bad userNewUser: Save attempt failed because the user's session has changed user extensionAbuseFilter: Save attempt failed because of the AbuseFilter extension extensionCaptcha: Save attempt failed because of the CAPTCHA extensions extensionSpamBlacklist: Save attempt failed because of the SpamBlacklist extension responseEmpty: Save attempt failed but the response was empty responseUnknown: Save attempt failed but the response was not recognised editPageDeleted: Save attempt failed because the page was deleted editConflict: Save attempt failed because of an edit conflict save_failure_message: description: The message key given for the first error when saving. type: string save_failure_timing: description: >- Timing information about action=saveFailure – time in milliseconds spent by the system processing save (sum of two parts: saveIntent to saveReady, and saveAttempt to saveFailure). type: integer abort_type: type: string enum: - preinit - nochange - switchwith - switchwithout - switchnochange - abandon - abandonMidsave - pageupdate description: >- Type information about action=abort: preinit: Editor has be initialised but is not yet ready nochange: User is exiting the editor, and content block is unchanged / transaction stack is empty switchwith: User is switching from one editor to another, retaining changes switchwithout: User is switching from one editor to another, discarding changes switchnochange: User is switching from one editor to another, and the content block is unchanged / transaction stack is empty abandon: User is exiting the editor, discarding changes abandonMidsave: User is exiting the editor, discarding changes, after a saveAttempt has been initiated but before saveSuccess/saveFailure. pageupdate: User is updating the page during an edit, requiring that the edit session be refreshed abort_mechanism: type: string enum: - cancel - navigate - navigate-back - navigate-read description: >- Mechanism information about action=abort: cancel: Editing was aborted by user clicking a cancel control navigate: Editing was aborted by user navigating to another page navigate-back: Editing was aborted by user navigating to the previous page by means of the 'back' button/control in their browser navigate-read: Editing was aborted by user navigating to the read page by means of the 'read' tab/control in their browser. is_oversample: description: 'Whether this request is an oversample, or a standard sample.' type: boolean editor_interface: type: string enum: - visualeditor - wikitext-2017 - wikitext - other description: >- The editor interface through which the user is attempting to edit the page. mw_version: description: MediaWiki version string. type: string platform: type: string enum: - desktop - tablet - phone - other description: >- The editing device through which the user is attempting to edit the page. integration: type: string enum: - page - flow - lqt - app - app-android - app-ios - discussiontools - contenttranslation description: >- The editor integration through which the user is attempting to edit the page. page_id: description: ID of the page the user is attempting to edit. type: integer page_title: description: >- Full title of the page the user is attempting to edit, including namespace (wgPageName format). This is needed to log edit activity on redlinks, as pageId and revId are not available. type: string page_ns: description: Namespace ID of the page the user is attempting to edit. type: integer revision_id: description: >- For all actions except `saveSuccess`, the ID of the revision that the user is attempting to edit (0 if the user is attempting to create a new page). For the `saveSuccess` action, the ID of the revision that has just been saved unless it is a null edit, in which case the id of the revision will have the same revision ID as the previous event type: integer editing_session_id: description: >- A string of 32 alphanumeric characters, unique to the current page view session; used for grouping events. type: string app_install_id: type: string minLength: 36 maxLength: 36 pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ description: |- UUIDv4 identifier generated when an application is installed. Identifies a particular install on a particular device. Only present in events submitted from apps. user_id: description: The user id (0 if logged out). type: integer user_is_temp: description: Whether the user is using a temporary account. type: boolean user_editcount: description: The total number of edits of the user. type: integer user_class: type: string enum: - IP - bot description: >- A flag for a kind of user about whom we don't care or for whom we can't measure edit counts. page_token: description: >- One-time token per page load (consistent with Schema:PageIssues and other schemas that use https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.user-method-getPageviewToken ). This will only be set for client-side (JavaScript-generated) events, for server-side events the value will be an empty string. type: string session_token: description: >- Session token that survives across pages (mw.user.sessionId()), but not browser restarts, used in deterministic user bucketing. This will only be set for client-side (JavaScript-generated) events, for server-side events the value will be an empty string. type: string bucket: description: >- If necessary, a string used to identify temporarily relevant groups of users, such as the groups in a controlled experiment. For example '2019-03-mobile-VE-section-editing-control'. If multiple buckets need to be set at once (e.g. for overlapping experiment), separate the strings with commas. type: string anonymous_user_token: description: >- A random, cookie-stored token used to temporarily distinguish individual anonymous editors in certain A/B tests (ref T225209). Null for registered editors and for any anonymous editors who were not assigned a test condition. type: string examples: - event: action: init editing_session_id: example editor_interface: other integration: page mw_version: example platform: other user_editcount: 0 user_id: 1 user_is_temp: false version: 1 meta: dt: '2020-04-02T19:11:20.942Z' id: b0caf18d-6c7f-4403-947d-2712bbe28610 stream: eventlogging_EditAttemptStep dt: '2020-04-02T19:11:20.942Z' client_dt: '2020-04-02T19:11:20.942Z' $schema: $ref: '#/$id' schema: EditAttemptStep