Page MenuHomePhabricator

Image instrumentation: image inspector
Closed, ResolvedPublic

Description

Corresponding task from "add a link": T268706: Add a link: difficulty overlay and difficulty filter
Associated feature: T290045: Add an image: image inspector


As the user proceeds through the task, they will use the “image inspector” dialog. We need to record events for these actions:

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)

If the user changes their response on a given image, that should be recorded as an additional event, but we do not need to indicate that it was a change.

Note that in the future, we may offer multiple image suggestions per article. Therefore, perhaps we should record which suggestion the user is on (e.g. 1 of 1), like we do with link suggestions, to be ready for when there may be multiple. That's an implementation decision.

Event Timeline

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

[mediawiki/extensions/GrowthExperiments@master] Add an image: instrumentation for dialogs invoked from the image inspector

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

Sample events:

Selecting yes

event: {
  "action": "suggestion_accept",
  "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,
  "active_interface": "recommendedimagetoolbar_dialog",
  "newcomer_task_token": "34f479d6b4aaf00fc642",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "plorp78mn398m81r4dm42rgeaotctoa7",
  "$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-03T18:00:22.590Z"
}

Selecting no

event: {
  "action": "suggestion_reject",
  "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,
  "active_interface": "recommendedimagetoolbar_dialog",
  "newcomer_task_token": "34f479d6b4aaf00fc642",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "plorp78mn398m81r4dm42rgeaotctoa7",
  "$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-03T18:00:46.192Z"
}

Skipping

event: {
  "action": "suggestion_skip",
  "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,
  "active_interface": "recommendedimagetoolbar_dialog",
  "newcomer_task_token": "34f479d6b4aaf00fc642",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "plorp78mn398m81r4dm42rgeaotctoa7",
  "$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-03T18:01:25.419Z"
}

Skip dialog

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=undefined;acceptance_state=undecided",
  "is_mobile": true,
  "active_interface": "skip_dialog",
  "newcomer_task_token": "ae825686cbcba5acb079",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "s9i45i9f01hkg8920mdv9nsbcna7g23o",
  "$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:14:39.773Z"
}

Confirm skip

event: {
  "action": "confirm_skip_suggestion",
  "action_data": "filename=HMS_Pandora.jpg;recommendation_source=wikipedia;recommendation_source_projects=nowiki,hewiki,cswiki,arwiki;series_number=1;total_suggestions=2;rejection_reasons=undefined;acceptance_state=undecided",
  "is_mobile": true,
  "active_interface": "skip_dialog",
  "newcomer_task_token": "ae825686cbcba5acb079",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "s9i45i9f01hkg8920mdv9nsbcna7g23o",
  "$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:16:05.734Z"
}

Closing skip dialog

event: {
  "action": "close",
  "action_data": "filename=HMS_Pandora.jpg;recommendation_source=wikipedia;recommendation_source_projects=nowiki,hewiki,cswiki,arwiki;series_number=1;total_suggestions=2;rejection_reasons=undefined;acceptance_state=undecided",
  "is_mobile": true,
  "active_interface": "skip_dialog",
  "newcomer_task_token": "ae825686cbcba5acb079",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "s9i45i9f01hkg8920mdv9nsbcna7g23o",
  "$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:15:06.580Z"
}

Opening image viewer

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=undefined;acceptance_state=undecided",
  "is_mobile": true,
  "active_interface": "imageviewer_dialog",
  "newcomer_task_token": "ae825686cbcba5acb079",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "s9i45i9f01hkg8920mdv9nsbcna7g23o",
  "$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:15:29.550Z"
}

Closing image viewer

event: {
  "action": "close",
  "action_data": "filename=HMS_Pandora.jpg;recommendation_source=wikipedia;recommendation_source_projects=nowiki,hewiki,cswiki,arwiki;series_number=1;total_suggestions=2;rejection_reasons=undefined;acceptance_state=undecided",
  "is_mobile": true,
  "active_interface": "imageviewer_dialog",
  "newcomer_task_token": "ae825686cbcba5acb079",
  "page_id": 1789,
  "page_title": "Edward Edwards (Royal Navy officer)",
  "homepage_pageview_token": "s9i45i9f01hkg8920mdv9nsbcna7g23o",
  "$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:15:47.418Z"
}

Change 736546 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add an image: instrumentation for dialogs invoked from the image inspector

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

Change 736643 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Add Image: Image details dialog

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

Change 736643 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add Image: Image details dialog

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

Change 737850 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[schemas/event/secondary@master] image_suggestion_interaction: update documentation

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

Change 737851 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Update Add Image schema version

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

Change 737850 merged by jenkins-bot:

[schemas/event/secondary@master] image_suggestion_interaction: update documentation

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

Change 737851 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Update Add Image schema version

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

Checked on testwiki wmf.9.

Note:

Note that the same image details dialog can be opened both from the image inspector and from the captions step. We need to be able to distinguish events that are triggered from the image inspector and those that were triggered from the caption step.

The difference will be indicated in indicating the source:

  • viewing image details from the image inspector source='toolbar_dialog'
  • viewing image details from the caption step: source=caption_entry'

I dug into a good number of Add Image sessions for T297138 and found no surprises there, the accept/reject/skip events appeared to be recorded just the way they should. I've also confirmed that source in action_data is set correctly for the image details dialogue. Closing this as resolved, as I don't think we at this point have a need to write specific test scripts and verify that everything's correct.