Page MenuHomePhabricator

Image instrumentation: captions
Closed, ResolvedPublic

Description

Associated feature: T290781: Add an image: captions

When the user is past the caption onboarding and is in the caption step, we want to record events for these actions:

  • Impression of landing on this step
  • Selecting the "back" arrow to return to the image inspector
  • Tapping into the caption box to focus there (only applicable if we do not bring the user's focus there automatically).
  • Selecting to view image details, closing that dialog, and selecting the link to Commons in that dialog. This is already specified in T294669: Image instrumentation: image inspector.
  • Selecting the question mark to re-open the caption onboarding, and closing that dialog. This is already specified in T294670: Image instrumentation: captions onboarding dialog.
  • Each time the caption validation is triggered. We should record which validation rule is triggered. In Iteration 1, there will only be one rule, which we can refer to as "too short". See T293161: Add an image: minimal caption validation.

For each event, we want to include:

  • Which article they are on
  • Which image is being suggested
  • The source for the suggestion (i.e. crosswiki, wikidata, commons category)

Event Timeline

Hi @MMiller_WMF — I have a few clarifications:

For these caption events, should we also include the suggestion-specific information (filename, projects etc) that we currently send for the actions from the image inspector (actions w/recommendedimagetoolbar_dialog active_interface)?

When the user selects the publish button to move to the edit summary.

I just realized that we are not recording this currently for add link (only impression action w/editsummary_dialog active_interface is recorded). Should we keep this consistent with add link?

@mewoph -- thanks for thinking critically on this. I made both corrections in the task description: yes including suggestion-specific info, and no to including publish button (we should keep it the same as add link).

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

[mediawiki/extensions/GrowthExperiments@master] Add an image: centralize construction of suggestionLogMetadata & add instrumentation for caption

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

Landing on caption step

event: {
  "action": "impression",
  "action_data": "filename=HMS_Pandora.jpg;recommendation_source=wikipedia;recommendation_source_projects=nowiki,hewiki,cswiki,arwiki;series_number=1;total_suggestions=2;rejection_reasons=;acceptance_state=accepted",
  "is_mobile": true,
  "newcomer_task_token": "349c1c4cbcb85dfd536d",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "3plodegehkab4dohegj23mlfdvsufo2v",
  "active_interface": "caption_entry",
  "$schema": "/analytics/mediawiki/structured_task/article/image_suggestion_interaction/1.1.0",
  "meta": {
    "stream": "mediawiki.structured_task.article.image_suggestion_interaction",
    "domain": "192.168.86.22"
  },
  "dt": "2021-11-04T17:33:44.834Z"
}

Focusing on caption field

event: {
  "action": "focus",
  "action_data": "filename=HMS_Pandora.jpg;recommendation_source=wikipedia;recommendation_source_projects=nowiki,hewiki,cswiki,arwiki;series_number=1;total_suggestions=2;rejection_reasons=;acceptance_state=accepted",
  "is_mobile": true,
  "newcomer_task_token": "349c1c4cbcb85dfd536d",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "3plodegehkab4dohegj23mlfdvsufo2v",
  "active_interface": "caption_entry",
  "$schema": "/analytics/mediawiki/structured_task/article/image_suggestion_interaction/1.1.0",
  "meta": {
    "stream": "mediawiki.structured_task.article.image_suggestion_interaction",
    "domain": "192.168.86.22"
  },
  "dt": "2021-11-04T17:34:22.528Z"
}

Going back to image inspector

event: {
  "action": "back",
  "action_data": "filename=HMS_Pandora.jpg;recommendation_source=wikipedia;recommendation_source_projects=nowiki,hewiki,cswiki,arwiki;series_number=1;total_suggestions=2;rejection_reasons=;acceptance_state=accepted",
  "is_mobile": true,
  "newcomer_task_token": "349c1c4cbcb85dfd536d",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "3plodegehkab4dohegj23mlfdvsufo2v",
  "active_interface": "caption_entry",
  "$schema": "/analytics/mediawiki/structured_task/article/image_suggestion_interaction/1.1.0",
  "meta": {
    "stream": "mediawiki.structured_task.article.image_suggestion_interaction",
    "domain": "192.168.86.22"
  },
  "dt": "2021-11-04T17:34:55.430Z"
}

Clicking on help button

event: {
  "action": "view_help",
  "action_data": "filename=HMS_Pandora.jpg;recommendation_source=wikipedia;recommendation_source_projects=nowiki,hewiki,cswiki,arwiki;series_number=1;total_suggestions=2;rejection_reasons=;acceptance_state=accepted",
  "is_mobile": true,
  "newcomer_task_token": "349c1c4cbcb85dfd536d",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "3plodegehkab4dohegj23mlfdvsufo2v",
  "active_interface": "caption_entry",
  "$schema": "/analytics/mediawiki/structured_task/article/image_suggestion_interaction/1.1.0",
  "meta": {
    "stream": "mediawiki.structured_task.article.image_suggestion_interaction",
    "domain": "192.168.86.22"
  },
  "dt": "2021-11-04T17:37:08.560Z"
}

Change 736860 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add an image: centralize construction of suggestionLogMetadata & add instrumentation for caption

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

Checked on testwiki wmf.9 - works as per specs; the details match https://phabricator.wikimedia.org/T294671#7482784

Note:

  • action:focus would be recorded every time a user clicks in the caption field

The caption dialogue was featured prominently in the analysis for T297138 and the data made sense. It's also relevant to other tasks as mentioned in the task description, and we've found the data to be correct there too. Closing this as resolved.