Page MenuHomePhabricator

Add an Image: back/next buttons in onboarding screens are not instrumented
Closed, ResolvedPublic

Description

Clicking "next" or "back" to move between the Onboarding screens does not result in logged events.

The instrumentation task (T294661) and the schema both specify that these actions should be logged.

Querying the logged data:

SELECT
  action,
  count(1) AS num_events
FROM event.mediawiki_structured_task_article_image_suggestion_interaction
WHERE year = 2022
AND month = 1
AND active_interface = 'onboarding_step_2_dialog'
GROUP BY action;

Gives the following result:

action	num_events
impression	851
skip_all	59

This also appears to be happening for Add a Link, as for example the logged data for onboarding_step_2_dialog in that stream does not contain any of those events either. Add a Link query on Hive:

SELECT
  action,
  count(1) AS num_events
FROM event.mediawiki_structured_task_article_link_suggestion_interaction
WHERE year = 2022
AND month = 1
AND active_interface = 'onboarding_step_2_dialog'
GROUP BY action;

Results in the following output:

action	num_events
impression	6694
link_click	17
skip_all	244

Expected result: some number of events with action = "next" and action = "back" logged for both.

Add link onboarding instrumentation task: T278111

Event Timeline

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

[schemas/event/secondary@master] Add navigation_type action_data

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

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

[mediawiki/extensions/GrowthExperiments@master] Structured task: log 'back' and 'next' actions for onboarding dialog

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

Sample payload:

Next click

event: {
  "action": "next",
  "action_data": "navigation_type=click",
  "is_mobile": true,
  "newcomer_task_token": "bqg8kbjcukcads8gvq7u1c88orlvnlp7",
  "page_id": 1732,
  "page_title": "Kapybara",
  "homepage_pageview_token": "lhe03cs5n1s296tmv7o9kd3dnb5nnigq",
  "active_interface": "onboarding_step_1_dialog",
  "$schema": "/analytics/mediawiki/structured_task/article/link_suggestion_interaction/1.4.2",
  "meta": {
    "stream": "mediawiki.structured_task.article.link_suggestion_interaction",
    "domain": "localhost",
    "id": "4b6d0f3a-bd1b-4d9e-b30f-8f19dca550f6",
    "dt": "2022-02-10T23:30:04.436Z",
    "request_id": "5ff0f810-8ac9-11ec-91e2-f18a631e32ae"
  },
  "dt": "2022-02-10T23:30:03.430Z",
  "http": {
    "request_headers": {
      "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1"
    },
    "client_ip": "127.0.0.1"
  }
}

Back click

event: {
  "action": "back",
  "action_data": "navigation_type=click",
  "is_mobile": true,
  "newcomer_task_token": "bqg8kbjcukcads8gvq7u1c88orlvnlp7",
  "page_id": 1732,
  "page_title": "Kapybara",
  "homepage_pageview_token": "lhe03cs5n1s296tmv7o9kd3dnb5nnigq",
  "active_interface": "onboarding_step_2_dialog",
  "$schema": "/analytics/mediawiki/structured_task/article/link_suggestion_interaction/1.4.2",
  "meta": {
    "stream": "mediawiki.structured_task.article.link_suggestion_interaction",
    "domain": "localhost",
    "id": "b2063b61-dbfb-407b-805c-e14091464252",
    "dt": "2022-02-10T23:30:52.991Z",
    "request_id": "7ce1dfc0-8ac9-11ec-91e2-f18a631e32ae"
  },
  "dt": "2022-02-10T23:30:51.984Z",
  "http": {
    "request_headers": {
      "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1"
    },
    "client_ip": "127.0.0.1"
  }
}

Next swipe

event: {
  "action": "next",
  "action_data": "navigation_type=swipe",
  "is_mobile": true,
  "newcomer_task_token": "bqg8kbjcukcads8gvq7u1c88orlvnlp7",
  "page_id": 1732,
  "page_title": "Kapybara",
  "homepage_pageview_token": "lhe03cs5n1s296tmv7o9kd3dnb5nnigq",
  "active_interface": "onboarding_step_1_dialog",
  "$schema": "/analytics/mediawiki/structured_task/article/link_suggestion_interaction/1.4.2",
  "meta": {
    "stream": "mediawiki.structured_task.article.link_suggestion_interaction",
    "domain": "localhost",
    "id": "3b44d29d-b940-45fe-acbf-fc4824883c62",
    "dt": "2022-02-10T23:31:29.491Z",
    "request_id": "92a35500-8ac9-11ec-91e2-f18a631e32ae"
  },
  "dt": "2022-02-10T23:31:28.481Z",
  "http": {
    "request_headers": {
      "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1"
    },
    "client_ip": "127.0.0.1"
  }
}

Back swipe

event: {
    "action": "back",
    "action_data": "navigation_type=swipe",
    "is_mobile": true,
    "newcomer_task_token": "bqg8kbjcukcads8gvq7u1c88orlvnlp7",
    "page_id": 1732,
    "page_title": "Kapybara",
    "homepage_pageview_token": "lhe03cs5n1s296tmv7o9kd3dnb5nnigq",
    "active_interface": "onboarding_step_2_dialog",
    "$schema": "/analytics/mediawiki/structured_task/article/link_suggestion_interaction/1.4.2",
    "meta": {
      "stream": "mediawiki.structured_task.article.link_suggestion_interaction",
      "domain": "localhost",
      "id": "3200858e-8693-4f8f-9fbf-e31a3f039fc1",
      "dt": "2022-02-10T23:32:01.557Z",
      "request_id": "a5c08540-8ac9-11ec-91e2-f18a631e32ae"
    },
    "dt": "2022-02-10T23:32:00.553Z",
    "http": {
      "request_headers": {
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1"
      },
      "client_ip": "127.0.0.1"
    }
  }

Change 761742 merged by jenkins-bot:

[schemas/event/secondary@master] Add navigation_type action_data

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

Change 761769 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Structured task: log 'back' and 'next' actions for onboarding dialog

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

Checked on testwiki wmf.23 (add link/add image for desktop/mobile) - the events are identical to the comment above. The version of schema on production is $schema: "/analytics/mediawiki/structured_task/article/link_suggestion_interaction/1.5.0" ( and for the add image: "$schema": "/analytics/mediawiki/structured_task/article/image_suggestion_interaction/1.2.0").