Page MenuHomePhabricator

Show survey to users of MinT for Wiki Readers
Closed, ResolvedPublic8 Estimated Story Points

Assigned To
Authored By
Pginer-WMF
Dec 10 2024, 3:06 PM
Referenced Files
F58868111: image.png
Mar 19 2025, 3:08 PM
F58582248: image.png
Mar 3 2025, 2:38 PM
F58582236: image.png
Mar 3 2025, 2:38 PM
F58582209: image.png
Mar 3 2025, 2:38 PM
F58582195: image.png
Mar 3 2025, 2:38 PM
F58518512: MinT Survey.png
Feb 28 2025, 12:22 PM
F58025291: MinT Survey.png
Dec 17 2024, 11:27 AM
F58025288: Kapture 2024-12-17 at 12.17.49.webm
Dec 17 2024, 11:27 AM

Description

As part of the work on MinT for Wiki Readers MVP (T359072), we want to learn about its impact.
In addition to impact metrics (T373862) we want to consider direct feedback from users. This ticket proposes to show a simple feedback survey when users access the translation view (T359801).

The goal is to check with users how useful they find the machine translation provided. Thus, we may want to ask users to indicate the level of usefulness, as well as other factors that help put that in context. For example, we can consider asking whether their evaluation is based on this particular instance or their general use, including this and previous machine translated articles.

As part of this ticket, we'll define the specific questions to ask, and design the way to invite users to take the survey without getting in the way.

Proposal

A simple in-context survey to provide users with one single question and a follow-up one in case they answer the first one.
Although Quick Survey extension cannot be used in this context (does not work on Special pages), the solution proposed is aligned with it and reuses aspects such as the privacy statement language.


Try prototype or explore in Figma.

Goals:

  • Clarity. We want to ask users about usefulness of the feature in a way that leaves no ambiguity.
  • Simplicity. We want to be simple to build and use. We want the prompt to be compact and the survey to be quick to fill. Users came for the content and we are asking the to do something different. In this scenario, if it is not a very simple task users may just skip it.

MinT Survey.png (1×1 px, 165 KB)

Key ideas:

  • Show the invite for feedback at the end of the page. It makes sense to ask for the evaluation of the content after the user had a chance to look at it. Given that sections are collapsed on the translation view, the request for feedback should be visible when users skim the translated contents.
  • Ask a simple yes/no question, and show an optional follow-up question for extra context. In order to balance being compact with getting useful information, the approach provides a simple yes/no question about the usefulness of the translated contents. After selecting an answer, a follow-up question is shown for users to select which aspects they found useful or not useful.
  • Additional aspects are intended to check specific value propositions:
    • Enabling to access contents that would be harder for users to access in their language (or not).
    • Translation quality limiting the learning (or not).
    • Usefulness as a way to get the gist of a topic (or not)
    • Effect of technical aspects such as loading time.
  • A final confirmation is shown with a link to the project talk page allowing users to provide more detailed feedback (opening in a new window/tab to avoid losing context)
  • We may want to coordinate with communities to make sure the UI messages are localized before the survey is exposed to users. In this way, monolingual users will be asked in their language.

Technical aspects:

  • The instrumentation infrastructure can be considered as a lightweight way to capture the results (among other options).

Event Timeline

Nikerabbit raised the priority of this task from Medium to High.Feb 17 2025, 8:13 AM
Nikerabbit set the point value for this task to 8.
abi_ changed the task status from Open to In Progress.EditedFeb 28 2025, 9:51 AM
abi_ claimed this task.
abi_ subscribed.

@Pginer-WMF,

Design questions

  1. I'm not seeing an icon in Codex for the smiley(s) present in the Yes / No buttons. See the full list of icons here: https://doc.wikimedia.org/codex/latest/icons/all-icons.html
  2. Where should the "privacy statement" link send the user to?

Change #1123618 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] AX: Show card to submit feedback on view translation page

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

@Pginer-WMF,

Design questions

  1. I'm not seeing an icon in Codex for the smiley(s) present in the Yes / No buttons. See the full list of icons here: https://doc.wikimedia.org/codex/latest/icons/all-icons.html

I think we can skip the icons:

  • Probably not worth the effort of adding the smilies to the icon repo for a one-off case, and introducing delays.
  • In similar cases the check (✓) and close (X) icons have been used. However, the close icon is something I'd avoid for this. People taping on it because they can get rid of the panel may introduce noise to the results. We also have a close icon for actually closing here.

I'll update the designs in the description.

  1. Where should the "privacy statement" link send the user to?

I copied that from the Quick Survey project, which is the tool I wish we could just use but it seems that was not working on Special pages. So we are doing a mini version of it in this task. The idea is to rely on the same principles. However, I'm not sure how to find where that is pointing to.

@KCVelaga_WMF Can we use the instrumentation infrastructure to capture the results? Would it be easy to set this up?

I was able to use the QuickSurveys extension to define the form. I loaded it using the approach mentioned in the documentation here:

mw.loader.using( 'ext.quicksurveys.init' )
	.then( () => {
		if ( mw.extQuickSurveys ) {

			mw.extQuickSurveys.showSurvey( 'ax-translation-view-feedback-survey' );
		}
	} );

The name of the survey is ax-translation-view-feedback-survey

Few drawbacks:

  1. The survey will displayed every-time the user refreshes or opens an automatic translation. It'll only respect the user's quick survey preference.
  2. I don't think we can achieve the same design as shown in the mock-ups while using the QuickSurveys extension

Please see the video of the survey in action at this link: https://drive.google.com/file/d/1SY1F5j1e3wS0CDZpCP50Wdtk_lhCQ-3q/view?usp=drive_link (Can't upload large files to Phabricator)

Screenshots on mobile:

image.png (1×490 px, 66 KB)
image.png (1×489 px, 95 KB)

Screenshots from desktop:

image.png (1×1 px, 95 KB)
image.png (1×1 px, 110 KB)

A few things to confirm with @Pginer-WMF,

  1. Currently the survey will be shown to all users: anonymous, or users with 0 edits etc. I assume that this is the expected behavior.
  2. I don't see a way to have "Yes" / "No" buttons in the first feedback step. I'd say this is the biggest departure from the designs described in the mockup. Is this an acceptable compromise?
  3. It is possible to also limit the survey based on the date and the geographical location. None of these are used right now.
  4. For the privacy policy, I've linked to: https://foundation.wikimedia.org/wiki/Policy:Privacy_policy

The quick survey configuration for the survey form is at:

1<?php
2$wgQuickSurveysConfig = [
3 [
4 'name' => 'Automatic Translation Feedback',
5 'type' => 'internal',
6 'embedElementId' => 'ax-translation-viewer-section-container',
7 'confirmMsg' => 'ax-translation-view-feedback-confirm-title',
8 'confirmDescription' => 'ax-translation-view-feedback-confirm-description',
9 'privacyPolicy' => 'ax-translation-view-feedback-privacy-statement',
10 'enabled' => true,
11 'audience' => [
12 // Specify an invalid pageId to avoid loading the "ext.quicksurveys.init" unless requested
13 'pageIds' => [ -1111 ]
14 ],
15 'coverage' => 0,
16 'platforms' => [
17 'desktop' => [ 'stable' ],
18 'mobile' => [ 'stable' ]
19 ],
20 'questions' => [
21 [
22 'name' => 'question-1',
23 'layout' => 'single-answer',
24 'question' => 'ax-translation-view-feedback-title',
25 'answers' => [
26 [ 'label' => 'ax-translation-view-feedback-positive' ],
27 [ 'label' => 'ax-translation-view-feedback-negative' ]
28 ]
29 ],
30
31 [
32 'name' => 'positive-question-2',
33 'dependsOn' => [
34 [
35 'question' => 'question-1',
36 'answerIsOneOf' => [ 'ax-translation-view-feedback-positive' ]
37 ]
38 ],
39 'layout' => 'multiple-answer',
40 'question' => 'ax-translation-view-feedback-details-question',
41 'answers' => [
42 [ 'label' => 'ax-translation-view-feedback-positive-missing-information' ],
43 [ 'label' => 'ax-translation-view-feedback-positive-translation-quality' ],
44 [ 'label' => 'ax-translation-view-feedback-positive-quick-overview' ],
45 [ 'label' => 'ax-translation-view-feedback-positive-technical-aspect' ],
46 ],
47 ],
48
49 [
50 'name' => 'negative-question-2',
51 'dependsOn' => [
52 [
53 'question' => 'question-1',
54 'answerIsOneOf' => [ 'ax-translation-view-feedback-negative' ]
55 ]
56 ],
57 'layout' => 'multiple-answer',
58 'question' => 'ax-translation-view-feedback-details-question',
59 'answers' => [
60 [ 'label' => 'ax-translation-view-feedback-negative-missing-information' ],
61 [ 'label' => 'ax-translation-view-feedback-negative-translation-quality' ],
62 [ 'label' => 'ax-translation-view-feedback-negative-quick-overview' ],
63 [ 'label' => 'ax-translation-view-feedback-negative-technical-aspect' ]
64 ],
65 ],
66 ]
67 ]
68];

The results of the survey are recorded in EventLogging. More details here: https://www.mediawiki.org/wiki/Extension:QuickSurveys#Results

@abi_ I can think of two ways to instrument this

Using the MinT for Readers event stream

This is the primary event stream for the feature, so events can be emitted to that stream, which is already in production. I can define the event structures for this. We can use action_context to capture the responses. I am not sure of the technical complexity of this, if the plan is to use QuickSurveys, and if it can be coupled with Metrics Platform schemas.

Quick Surveys schema

I see that you have proposed to use QuickSurveys. QuickSurveys itself has a couple of schemas:

There has been some migration/deprecation with some of that recently, which I have to double check about -- I will do that next week (I am OOO for the rest of the week).

Thanks for checking the Quick survey option, @abi_. Using a standard solution makes total sense, and what you showed seems promising.
These are the aspects that it would be good to consider polishing:

  • Remove the "Back" button from 2nd step The first form shows the option to "Submit", but when the user navigates to the second form, there is an option to go "Back" that makes it unclear whether the information from the previous one was actually submitted. If the information is submitted when the "Submit" button is pressed, it does not make much sense to go back and submit again (the same or a different answer).
  • Adjust the yes/no actions. Consider using buttons. Based on this documentation page it seems that it is possible to use the layout: single-answer option to use buttons (the look will be different from the original design, but that is ok). If only radio buttons were possible, it would be great to have the submit button to become active only when the user has selected an option.
  • Minor UI text adjustments. UI messages seem to have unexpected spaces before the full stop at the end of a sentence. A minor glitch that we may want to iron out if possible.

Regarding the specific questions:

A few things to confirm with @Pginer-WMF,

  1. Currently the survey will be shown to all users: anonymous, or users with 0 edits etc. I assume that this is the expected behavior.

This is expected. The feature is targeted to readers and most are expected to access it without logging in.

  1. I don't see a way to have "Yes" / "No" buttons in the first feedback step. I'd say this is the biggest departure from the designs described in the mockup. Is this an acceptable compromise?

I remembered some Quick Survey uses where the answers were buttons. I shared some info I found about the layout options above, but I don't have more technical details about this. Buttons are preferred for the yes/no options, but if there is a technical limitation, and we have to stick with radio buttons I think it is ok.

  1. It is possible to also limit the survey based on the date and the geographical location. None of these are used right now.

Good to know. In the current experiment context, I think we don't need to restrict this further since the A/B testing infrastructure and the experimental period will limit the exposure. But this seems useful for the future if we decide to keep the feature for longer and still want to learn from direct user input.

  1. For the privacy policy, I've linked to: https://foundation.wikimedia.org/wiki/Policy:Privacy_policy

Sounds good!

Change #1124454 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/QuickSurveys@master] Add option to hide the back button on the survey

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

@Pginer-WMF Please find my responses below:

Remove the "Back" button from 2nd step The first form shows the option to "Submit", but when the user navigates to the second form, there is an option to go "Back" that makes it unclear whether the information from the previous one was actually submitted. If the information is submitted when the "Submit" button is pressed, it does not make much sense to go back and submit again (the same or a different answer).

Currently this is not possible to do cleanly. I've submitted a patch to add support for this in the QuickSurvey extension. Lets see if it gets merged.

Adjust the yes/no actions. Consider using buttons. Based on this documentation page it seems that it is possible to use the layout: single-answer option to use buttons (the look will be different from the original design, but that is ok). If only radio buttons were possible, it would be great to have the submit button to become active only when the user has selected an option.

Sorry I should have mentioned, I tested this but it doesn't appear to work as documented. Looking at the code, I don't see any support for it. I could implement it but will check with @Jdlrobson first. Created T387872: QuickSurveys should use CdxButton/CdxButtonGroup if a single-answer question has only 2 answers

Minor UI text adjustments. UI messages seem to have unexpected spaces before the full stop at the end of a sentence. A minor glitch that we may want to iron out if possible.

Thanks. I assume you noticed it with privacy statement .. An external link icon should appear there but that's not rendering properly. I think it's a issue with my local setup and shouldn't happen on production but will keep an eye out for it. Let me know if you see it elsewhere too.

Change #1124454 abandoned by Abijeet Patro:

[mediawiki/extensions/QuickSurveys@master] Add option to hide the back button on the survey

Reason:

Will use CSS.

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

Change #1124710 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/QuickSurveys@master] SurveyContextFilter: Remove namespace check if pageId is provided

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

Change #1124739 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/QuickSurveys@master] Allow surveys to be configured to appear on specific page names

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

I just confirmed that the both event streams, that is QuickSurveyInitiation and QuickSurveysResponses, are active, and can be used. However, they may not have enough coverage. For example, we will need to capture, source and target language, so to capture the survey response itself, we can use Schema:QuickSurveysResponses, and also simultaneously fire another event to capture the response context using the MinT for Readers stream.

@abi_ will it be possible to fetch the surveySessionToken on initiation, and pass that into action_context of MinT for Readers instrumentation, where we capture target/source languages, pages etc.? I can then use that join QuickSurveysResponses logs.

I just confirmed that the both event streams, that is QuickSurveyInitiation and QuickSurveysResponses, are active, and can be used. However, they may not have enough coverage. For example, we will need to capture, source and target language, so to capture the survey response itself, we can use Schema:QuickSurveysResponses, and also simultaneously fire another event to capture the response context using the MinT for Readers stream.

@abi_ will it be possible to fetch the surveySessionToken on initiation, and pass that into action_context of MinT for Readers instrumentation, where we capture target/source languages, pages etc.? I can then use that join QuickSurveysResponses logs.

It might be possible to do that.

But before I check that do the survey responses have the web URL from where they are triggered? If they are, we can get all the details that we need from there. Example: Special:AutomaticTranslation?page=Moon&from=en&to=hi&step=translation; this has the page title, source and target language.

But before I check that do the survey responses have the web URL from where they are triggered?

Not sure about this. @Jdlrobson or @phuedx might be able to answer.

@abi_ will it be possible to fetch the surveySessionToken on initiation, and pass that into action_context of MinT for Readers instrumentation, where we capture target/source languages, pages etc.? I can then use that join QuickSurveysResponses logs.

This is possible. If we want to go with this route, we can do that.

@abi_ event to be logged to MinT for Readers stream, simultaneous to the response:

Interaction data

action: survey_response
action_context: //surveySessionToken//

Note: action_context will be sanitized after a 90-day period, so will the survey session token association.

Translation object

  • source_title
  • source_language
  • target_title
  • target_language

We don't need a separate event for initiation as QuickSurveys would already log that, and if a survey is initiated and there is no associated response, we assume that the user left the survey.

I'm logging a single event after the reader has completed the entire survey.

{
  "action": "survey_response",
  "action_source": "translation_view",
  "action_context": "922e7a86c0e5f7c449dc-quicksurveys",
  "translation": {
    "source_language": "en",
    "target_language": "hi",
    "source_title": "Moon",
    "target_title": "चन्द्रमा"
  },
  "$schema": "/analytics/product_metrics/web/translation/1.0.0",
  "agent": {
    "client_platform": "mediawiki_js",
    "client_platform_family": "mobile_browser"
  },
  "dt": "2025-03-11T17:42:17.239Z",
  "meta": {
    "stream": "mediawiki.product_metrics.translation_mint_for_readers",
    "domain": "192.168.72.78"
  }
}

Change #1126617 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[operations/mediawiki-config@master] AX: Add quick survey for MinT for Wikireaders

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

@Pginer-WMF If the user has completed the survey for a particular article, but then refreshes the page while on the same article they would see the survey again. Is that acceptable?

It would be possible to add a simple session based storage that would check whether the user has submitted a survey for the given article. This storage would be cleaned up when the user closes their browser.

@abi_

I'm logging a single event after the reader has completed the entire survey.

Looks good to me. Also wanted to confirm, if actual survey response itself being captured by QuickSurveys streams.

@abi_

I'm logging a single event after the reader has completed the entire survey.

Looks good to me. Also wanted to confirm, if actual survey response itself being captured by QuickSurveys streams.

Yup the responses are captured inside QuickSurveys event stream

Change #1123618 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] AX: Display view translation feedback survey to the user

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

@Pginer-WMF If the user has completed the survey for a particular article, but then refreshes the page while on the same article they would see the survey again. Is that acceptable?

I think it is acceptable. We were aiming for a simple survey mechanism, and I don't expect this to add much noise to the results, given the survey is shown at the bottom of the page after the contents.

In any case, it may be worth checking with @KCVelaga_WMF whether it would be possible to identify whether the same user has replied many times. This would allow us to verify if the results look different if we consider just one vote per user, for example.

Change #1128498 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] AX: Quick survey: Hide survey when source/target language changes

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

An issue I noticed when doing QA locally is that when changing the source or target language, multiple survey will appear in the interface. I've submitted a patch to fix this.

Change #1128498 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] AX: Quick survey: Hide survey when source/target language changes

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

But before I check that do the survey responses have the web URL from where they are triggered?

Not sure about this. @Jdlrobson or @phuedx might be able to answer.

IIRC they have the namespace ID, page ID and page title but not the URL.

I'm sorry for not responding sooner.

An issue I noticed when doing QA locally is that when changing the source or target language, multiple survey will appear in the interface. I've submitted a patch to fix this.

This appears to be a bug in QuickSurveys. IIRC QuickSurveys should only show one survey, regardless of which method is being used to show the survey (URL, sampling, or method).

In any case, it may be worth checking with @KCVelaga_WMF whether it would be possible to identify whether the same user has replied many times. This would allow us to verify if the results look different if we consider just one vote per user, for example.

Yes, it is possible. The Metrics Platform client captures the user name and we have an associated QuickSurveys session ID in the event -- so it will be possible to identify if a user has responded multiple times.

This is deployed on the test server and can be viewed on: https://language-cx.wmcloud.org/index.php/Special:AutomaticTranslation?page=Moon&from=en&to=or&step=translation

The configuration for the QuickSurvey is the same as the one used in this patch: https://gerrit.wikimedia.org/r/c/1126617

image.png (1×598 px, 97 KB)

Pertinent discussion comments:

  1. https://phabricator.wikimedia.org/T381886#10590537
  2. https://phabricator.wikimedia.org/T381886#10600184
  3. https://phabricator.wikimedia.org/T381886#10624264
  4. https://phabricator.wikimedia.org/T381886#10642036

To see the event log, you can paste the following into the browser console:

mw.loader.using('mediawiki.api')
    .then(
        () => new mw.Api().saveOption('eventlogging-display-web', '1')
    );

Change #1126617 merged by jenkins-bot:

[operations/mediawiki-config@master] AX: Add quick survey for MinT for Wikireaders

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

Mentioned in SAL (#wikimedia-operations) [2025-03-25T08:33:26Z] <kartik@deploy1003> Started scap sync-world: Backport for [[gerrit:1126617|AX: Add quick survey for MinT for Wikireaders (T381886)]]

Mentioned in SAL (#wikimedia-operations) [2025-03-25T08:38:24Z] <kartik@deploy1003> abi, kartik: Backport for [[gerrit:1126617|AX: Add quick survey for MinT for Wikireaders (T381886)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-03-25T08:54:26Z] <kartik@deploy1003> Finished scap sync-world: Backport for [[gerrit:1126617|AX: Add quick survey for MinT for Wikireaders (T381886)]] (duration: 20m 59s)

Tested and works as expected.

Thanks. Moving to Done column.