Page MenuHomePhabricator

Update click tracking to take into account screen resolution
Closed, ResolvedPublic3 Estimated Story Points

Description

A common theme during Desktop Improvements (Vector 2022) we're often interested in user when behaviour inside resized windows/smaller windows.

  • One example is the table of contents where the behaviour for desktop users will not be the same as for < 1000px.
  • Another example is where we collapse certain items into the user menu .g. watchlist icon

TODO

  • Check that legal team would be okay with us recording window width as categories e.g. 1000-1200px, 800-1000, <800
  • Update DesktopWebUIClickTracking schema to have windowBucket field.
  • Record this data in DesktopWebUIClickTracking

QA steps

Trigger a click event in the beta cluster. Inspect the network tab to see the request. Inside the request JSON there should be a field relating to a window width bucket.

Screen Shot 2022-03-29 at 10.10.06 AM.png (640×2 px, 245 KB)

Resize the window and check clicks have different buckets.

https://phabricator.wikimedia.org/T301391#7823760
https://phabricator.wikimedia.org/T301391#7823765

QA Results - Beta

ACStatusDetails
1T301391#7823760

QA Results - Prod

ACStatusDetails
1T301391#7823765

QA Results - Beta

ACStatusDetails
1T301391#7850276

Additional production QA steps

  • Verify that events are being sent to production. To do this use hue.wikimedia.org/ and run query select * from event.desktopwebuiactionstracking where year = 2022 and month = 4 and day = 5 and event.name = 'ui.toc' and webhost = 'www.mediawiki.org' and event.viewportsizeBucket is not null

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson renamed this task from Update click tracking to take into accoutn screen resolution to Update click tracking to take into account screen resolution.Feb 14 2022, 6:22 PM

I was curious what this specific bucketing would look like.

In Vector, we currently use the following breakpoints:

@width-breakpoint-tablet: 720px;
@width-breakpoint-desktop: 1000px;
@width-breakpoint-desktop-wide: 1200px;
@max-width-workspace-container + ( 2 * @padding-horizontal-page-container ) : 1500

In core, these are the breakpoints defined in mediawiki.ui :

@width-breakpoint-mobile: 320px;
@width-breakpoint-tablet: 720px;
@width-breakpoint-desktop: 1000px;
@width-breakpoint-desktop-wide: 1200px;
@width-breakpoint-desktop-extrawide: 2000px;

For monitoring differences in behaviour based on screen resolution (due to differences in layout), it seems like we can probably stick to the sizes in mediawiki.ui as the bucket values.

Tracking the extrawide resolution could also give us an idea of how much we should accommodate extrawide monitors, and tracking the tablet and mobile resolutions would give us an idea of how many users are using Vector on their mobile devices.

@Jdrewniak I think those buckets would be a great starting point, however having them more granular (e.g. 200px intervals) would help us prioritize bugs which say stuff like "This is broken at 823px resolution! The eventual goal here would be to add this field to all schema events.

Change 767437 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/extensions/WikimediaEvents@master] [WIP] Add \"viewportSize\" metric to desktopWebUIActions tracking

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

Change 767439 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[schemas/event/secondary@master] [WIP] Updating desktopwebuiactionstracking with viewport buckets

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

The privacy team has conducted a review of the proposed data collection scheme — without mitigations, it would be deemed medium risk. However, after privacy-protecting mitigations like automated data deletion after 90 days, bucketing, and restricting access to WMF/NDA'd people, collecting this data was deemed low risk.

Feel free to approve these gerrit patches and get on your merry way!

Change 767439 merged by jenkins-bot:

[schemas/event/secondary@master] Updating desktopwebuiactionstracking with viewport buckets

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

Jdrewniak changed the subtype of this task from "Bug Report" to "Task".Mar 28 2022, 3:27 PM

Change 767437 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Add "viewportSize" metric to desktopWebUIActions tracking

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Trigger a click event in the beta cluster. Inspect the network tab to see the request. Inside the request JSON there should be a field relating to a window width bucket.
Resize the window and check clicks have different buckets.

Screen Shot 2022-03-31 at 9.27.25 AM.png (1×1 px, 420 KB)

Screen Shot 2022-03-31 at 9.30.05 AM.png (1×707 px, 283 KB)

Screen Shot 2022-03-31 at 9.28.35 AM.png (1×1 px, 525 KB)

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Trigger a click event. Inspect the network tab to see the request. Inside the request JSON there should be a field relating to a window width bucket.
Resize the window and check clicks have different buckets.

Screen Shot 2022-03-31 at 6.16.15 PM.png (1×718 px, 310 KB)

Screen Shot 2022-03-31 at 6.14.57 PM.png (1×1 px, 426 KB)

Screen Shot 2022-03-31 at 6.04.39 PM.png (1×1 px, 446 KB)

This doesn't seem to be working. Not sure why we're not seeing validation errors though.

Change 777443 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/extensions/WikimediaEvents@master] Update to 78eef14, rename viewportSize to viewportSizeBucket

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

Change 777389 had a related patch set uploaded (by Jdlrobson; author: Jdrewniak):

[mediawiki/extensions/WikimediaEvents@wmf/1.39.0-wmf.6] Update to 78eef14, rename viewportSize to viewportSizeBucket

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

Change 777443 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Update to 78eef14, rename viewportSize to viewportSizeBucket

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

Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: ovasileva.

Change 777389 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@wmf/1.39.0-wmf.6] Update to 78eef14, rename viewportSize to viewportSizeBucket

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

Mentioned in SAL (#wikimedia-operations) [2022-04-06T20:10:06Z] <cjming@deploy1002> Synchronized php-1.39.0-wmf.6/extensions/WikimediaEvents/modules/ext.wikimediaEvents/desktopWebUIActions.js: Backport: [[gerrit:777389|Update to 78eef14, rename viewportSize to viewportSizeBucket (T301391)]] (duration: 00m 55s)

Change 777869 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/extensions/WikimediaEvents@master] Fix string values in desktopWebUIActions schema

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

Change 777876 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[schemas/event/secondary@master] Fixing typo in desktopwebuiactionstracking schema

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

Change 777869 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Fix string values in desktopWebUIActions schema

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

Change 779084 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[schemas/event/secondary@master] Fixes typo in schema

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

Change 779084 merged by Ottomata:

[schemas/event/secondary@master] Fixes typo in schema

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Trigger a click event in the beta cluster. Inspect the network tab to see the request. Inside the request JSON there should be a field relating to a window width bucket.
Resize the window and check clicks have different buckets.

Screen Shot 2022-04-12 at 6.23.43 PM.png (1×1 px, 444 KB)

Screen Shot 2022-04-12 at 6.26.36 PM.png (1×1 px, 433 KB)

Screen Shot 2022-04-12 at 6.27.42 PM.png (1×1 px, 370 KB)

Screen Shot 2022-04-12 at 6.29.15 PM.png (1×895 px, 353 KB)

Screen Shot 2022-04-12 at 6.30.30 PM.png (1×711 px, 307 KB)

I'll QA/sign this off today by confirming data is coming in.

I have confirmed that data is coming in.
For mediawiki.org:

Screen Shot 2022-04-13 at 9.45.32 AM.png (522×1 px, 59 KB)

Change 777876 abandoned by Jdrewniak:

[schemas/event/secondary@master] Fixing typo in desktopwebuiactionstracking schema

Reason:

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