Page MenuHomePhabricator

Instrumentation: Edit mode toggle
Closed, ResolvedPublic

Description

Associated feature: T269653: Add a link: edit mode toggle (machine suggestions & visual)

When the user has begun the task, they are able to toggle the mode of the editor from machine suggestions mode to regular Visual Editor mode. When the user attempts to switch, they will see the modal asking if they are sure they want to switch. We need to record:

  • When they open the dropdown to switch.
  • The editor they select to switch to.
  • When they receive the modal.
  • Their button selection in the modal.

After switching, users are able to switch back to machine suggestions, though this resets them to the beginning of the suggestions for that article. We need to record an event for when they switch back.

Event Timeline

kostajh triaged this task as Medium priority.Apr 14 2021, 12:54 PM

The feature (T269653: Add a link: edit mode toggle (machine suggestions & visual)) that's being instrumented is in the post-release backlog; moving this one there too.

Hi @nettrom_WMF @MMiller_WMF, for this, I propose the following additions to link_suggestion_interaction schema:

For active_interface enum:

- editmode_confirmation_dialog

For action enum:

- editmode_click # The user opened the edit mode dropdown
- editmode_select # The user selected an editing mode
- editmode_confirm_switch # The user clicked on confirm button in editmode_confirmation_dialog
- editmode_cancel_switch # The user clicked on cancel button in editmode_confirmation_dialog

For action_data:

For action=editmode_select, selected_mode is "visual", "machineSuggestions" or "source"

When switching back to machine suggestions mode, impression action with machinesuggestions_mode is recorded.

Let me know if any changes are needed, thanks!

Change 704402 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[schemas/event/secondary@master] Add a link: Update schema to support edit mode toggle

https://gerrit.wikimedia.org/r/704402

@nettrom_WMF @MMiller_WMF — question regarding the active_interface when sending events when the user has switched to VE. Should we add a new active_interface or should we use machinesuggestions_mode? I think it could go either way since this is mostly regular VE with the one difference being that the edit mode dropdown only has suggestions & visual (instead of visual & source).

Change 700719 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] [WIP] Add a link: Edit mode toggle (w/machine suggestions & regular VE modes)

https://gerrit.wikimedia.org/r/700719

I love that we have active_interface, and I think editmode_confirmation_dialog makes great sense to use for this!

Based on my reading of the measurement specification, this instrumentation will cover the question we ask there (what proportion leaves machine suggestions mode?). That being said, I'm wondering if we could also record selected_mode for action=editmode_confirm_switch? I wouldn't be surprised if at some point we're wondering what editor users switch to, or that we want to ignore events where they switched back to machine suggestions mode. Figuring those things out would be a lot easier with that being directly available.

I'm got curious about the modes. EditAttemptStep uses visualeditor, wikitext-2017, and wikitext for the editor_interface field. But then I found that VisualEditorFeatureUse's data dictionary has source-desktop and visual-desktop for wikitext and VE on desktop, source-mobile and visual-mobile mobile, and source-nwe-desktop for the 2017 wikitext editor. Since machine suggestions and VE are tightly connected, keeping source and visual seems to keep things consistent.

Does it make sense to not capitalize the "S" in "machineSuggestions"?

I think we can keep machinesuggestions_mode for the events happening after the user switched out, since we haven't really moved them to a different editor. It'll also make it easier to find the events since the active interface will always be the same.

Thanks for confirming @nettrom_WMF! I think it makes sense to not camelcase "machineSuggestions" to be consistent w/the rest of the existing values.

We could add selected_mode for action=editmode_confirm_switch as well. The possible values will be source, visual and machinesuggestions (same as for action=editmode_select).

Looks good to me! I +1'ed the schema patch, and if a +2 is needed at some point just let me know and I can do that too.

Change 704402 merged by jenkins-bot:

[schemas/event/secondary@master] Add a link: Update schema to support edit mode and link inspector toggles; add client_ip

https://gerrit.wikimedia.org/r/704402

Change 700719 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add a link: Edit mode toggle (w/machine suggestions & regular VE modes)

https://gerrit.wikimedia.org/r/700719

Checked in betalabs - will need to check in production
Notes:
(a minor issue) There is a stray event recorded from the intro tour - action: "impression", action_data: "dont_show_again=false". It gets recorded every time a user switches between VE mode and Suggestions mode and the intro tour is not shown to a user.
The sequence of events:

  • a user lands on a page with add link recommendations, and the intro tour is shown: action: "impression", action_data: "dont_show_again=false", active_interface: "onboarding_step_1_dialog"
  • a user clicks: "Skip all" - action: "skip_all", action_data: "dont_show_again=false"
  • a user switches to VE mode: action: "impression", action_data: "dont_show_again=false" - the intro tour is not shown.
  • a user switches back to Suggestions mode: action: "impression", action_data: "dont_show_again=false" - the intro tour is not shown.

the event is recorded even if Suggested edits mode is failed to load, i.e. "Back to suggested edits" popup is displayed.

@Etonkovidova -- I think that stray event is enough reason to create a subtask for @mewoph to fix it. Thank you!

@Etonkovidova @MMiller_WMF I created T288561: Add a link: additional impression event recorded for onboarding dialog. It looks like this is not strictly unique to edit mode toggle. It's also reproducible when reloading the page while in suggestions mode.

@Etonkovidova @MMiller_WMF I created T288561: Add a link: additional impression event recorded for onboarding dialog. It looks like this is not strictly unique to edit mode toggle. It's also reproducible when reloading the page while in suggestions mode.

Thanks! I checked in production - the edit mode toggle events are present.