Page MenuHomePhabricator

Instrument New Diff Screen and actions
Closed, ResolvedPublic

Description

Background
This task is to wire up the event logging for the new features that will be created for watchlist.

The task
Shay to add further details below:

  • Instrument new Diff screen and new actions
  • Create task for Shay to validate events are firing in Beta

Requirements

  • Ensure data indicates events are firing for this task to be considered complete

References
The Deepdive deck

Designs on Figma

Watchlist Instrumentation Docs:
For diff page analytics see end of deck and last rows in Instrumentation spreadsheet

iOS Watchlist Schema deck
iOS Watchlist Instrumentation Process and Spec doc

Event Timeline

JTannerWMF triaged this task as High priority.

Watchlist Instrumentation Docs:
For diff page analytics see end of deck and last rows in Instrumentation spreadsheet

iOS Watchlist Schema deck

iOS Watchlist Instrumentation Process and Spec doc

Watchlist Instrumentation Docs:
For diff page analytics see end of deck and last rows in Instrumentation spreadsheet

iOS Watchlist Schema deck

iOS Watchlist Instrumentation Process and Spec doc

@SNowick_WMF Thanks for these metric details! Some questions:

  • RE: user selects editor name from diff view - each diff view may have 2 editor user buttons displayed: one for the old revision author and one for the new revision author. Are we ok not distinguishing between these buttons and generically tracking the events listed regardless of which user button is tapped?
  • The spec notes both user clicks ‘Unwatch’ in overflow menu and user is shown unwatch confirm popup in the case that the user is already watching the page, but there is no corresponding metric for the user clicking "watch" and the confirmation display if the user isn't already watching the page. Is this expected?
  • For (if exists, screen not shown in design) user is shown Share confirm popup, is the intent to log this metric only if the user has successfully shared the content they tapped to some service?

Engineering notes for @Mazevedo:

  • We can focus on diff related metrics for now, and hold off on the watchlist related metrics until we're further along on the watchlist feature app-wide
  • Depending on the answer from above for user is shown share confirmation, we can tap into the UIActivityViewControllers completionWithItemsHandler and consider completed to determine a successful share attempt

Thanks @Dmantena for the thorough notes.

  • Added action events for editor name clicks while in edit split view (diff_user_menu_from and diff_user_menu_to), the single edit view action stays the same and all menu events stay the same as well. (Slide 16)
  • Added diff overflow menu Watch select and confirm actions (diff_over_watch and diff_over_watch_confirm) (Slide 17)
  • Good question on the Share confirm, if we have a way to confirm the share event then yes we should measure the successful share.

Also: I was not sure about adding events for when user selects Rollback from the overflow menu - if there are popup and confirmation events for that we will want to track as well and I can add them to the deck/instrumentation specs.

Please let me know if there's anything else I may have missed.

Also: I was not sure about adding events for when user selects Rollback from the overflow menu - if there are popup and confirmation events for that we will want to track as well and I can add them to the deck/instrumentation specs.

@SNowick_WMF Here's what it looks like when they successfully undo or rollback - we display a little banner.

Undo happy path:

undo success.gif (1×878 px, 1 MB)

Rollback happy path:

rollback success.gif (1×878 px, 1 MB)

Sync update: @SNowick_WMF and I confirmed that diff_open will get logged any time a new diff is opened, which includes after tapping the previous and next buttons.

Here's my progress on the schema file:

And my progress is in branch T341896 (in both the wikipedia-ios and wikipedia-ios-components repos).

Remaining things to hash out are these actions from the spreadsheet:

diff_thank_login - non logged in user clicks login
diff_thank_create - non registered user is prompted to create account

Not sure when we log those, since the actual button to enter these flows is combined:

Screenshot 2023-07-19 at 3.32.14 PM.png (1×575 px, 300 KB)

We also want to log when rollback or undo encounters any API or system errors, and log the code (just an optional string field) if we can. This will help us track things like rejection due to an edit conflict.

Update:

diff_thank_login - non logged in user clicks login
diff_thank_create - non registered user is prompted to create account

Instead of these, the plan is to lean on the login funnel for tracking actions in the login / create account flow. We will add a new category called "diff" so we know what source created accounts and logins came from.

https://schema.wikimedia.org/repositories/secondary/jsonschema/analytics/mobile_apps/ios_login_action/current.yaml

@Tsevener I have added more detail on edit tracking for Undo and Rollback events in Schema Deck and Instrumentation dock.

This includes adding a column action_data to the schema to track edit error reasons, revision_ids and edit_types for edit success and fail events - actions that need action_data are noted in docs.

I also clarified which events go with EditAttemptStep actions and added notes on where we are tracking the above-mentioned ios_login_actionevents.

I also included some events for possible confirmation pop-up screen events, if they're not relevant please disregard (but note on slides so I can update).

Thanks - let's schedule a meeting to review if we need to go over any details.

Change 941012 had a related patch set uploaded (by Tsevener; author: Tsevener):

[schemas/event/secondary@master] Update schemas for iOS diff view changes

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

Tsevener moved this task from Doing to Needs Code Review on the iOS Release FY2023-24 (Archive) board.
Tsevener subscribed.

Change 941012 merged by jenkins-bot:

[schemas/event/secondary@master] Update schemas for iOS diff view changes

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

Change 941514 had a related patch set uploaded (by Tsevener; author: Tsevener):

[operations/mediawiki-config@master] Add stream config for iOS schema

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

Change 941514 merged by jenkins-bot:

[operations/mediawiki-config@master] Add stream config for iOS schema

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

Mentioned in SAL (#wikimedia-operations) [2023-07-26T13:02:35Z] <jforrester@deploy1002> Started scap: Backport for [[gerrit:941514|Add stream config for iOS schema (T341896)]]

Mentioned in SAL (#wikimedia-operations) [2023-07-26T13:13:35Z] <jforrester@deploy1002> sync-world aborted: Backport for [[gerrit:941514|Add stream config for iOS schema (T341896)]] (duration: 11m 00s)

Mentioned in SAL (#wikimedia-operations) [2023-07-26T13:14:05Z] <jforrester@deploy1002> Started scap: Backport for [[gerrit:941514|Add stream config for iOS schema (T341896)]]

Mentioned in SAL (#wikimedia-operations) [2023-07-26T13:23:43Z] <jforrester@deploy1002> jforrester and tsev: Backport for [[gerrit:941514|Add stream config for iOS schema (T341896)]] synced to the testservers mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet, and mw-debug kubernetes deployment (accessible via k8s-experimental XWD option)

Mentioned in SAL (#wikimedia-operations) [2023-07-26T13:34:21Z] <jforrester@deploy1002> Finished scap: Backport for [[gerrit:941514|Add stream config for iOS schema (T341896)]] (duration: 20m 16s)

Change 944942 had a related patch set uploaded (by Tsevener; author: Tsevener):

[schemas/event/secondary@master] Change diff open action for iOS watchlists schema

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

Change 944942 abandoned by Tsevener:

[schemas/event/secondary@master] Change diff open action for iOS watchlists schema

Reason:

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

Change 944965 had a related patch set uploaded (by Tsevener; author: Tsevener):

[schemas/event/secondary@master] Change diff open action for iOS watchlists schema (2nd attempt)

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

Change 944965 merged by jenkins-bot:

[schemas/event/secondary@master] Change diff open action for iOS watchlists schema (2nd attempt)

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

Change 945628 had a related patch set uploaded (by Tsevener; author: Tsevener):

[schemas/event/secondary@master] Change diff user menu action names for iOS watchlists schema

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

Change 945628 merged by jenkins-bot:

[schemas/event/secondary@master] Change diff user menu action names for iOS watchlists schema

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