Page MenuHomePhabricator

Anon user click tracking is not recorded correctly
Closed, ResolvedPublic

Description

While logged out click on a main menu item (say, the home button) and you'll get the following message in the console:

Validation error against schema MobileWebMainMenuClickTracking: Wrong type for property: username null

According to the schema the username can be empty[1]. We should not send the username if it's null.

[1] https://meta.wikimedia.org/wiki/Schema:MobileWebMainMenuClickTracking

Details

Related Gerrit Patches:
mediawiki/extensions/MobileFrontend : wmf/1.25wmf13Conform to schema
mediawiki/extensions/MobileFrontend : wmf/1.25wmf14Conform to schema
mediawiki/extensions/MobileFrontend : masterConform to schema

Event Timeline

bmansurov created this task.Jan 6 2015, 9:53 PM
bmansurov raised the priority of this task from to Needs Triage.
bmansurov updated the task description. (Show Details)
bmansurov added a project: Readers-Web-Backlog.
bmansurov added a subscriber: bmansurov.
bmansurov claimed this task.Jan 7 2015, 8:48 PM
bmansurov set Security to None.

Change 183321 had a related patch set uploaded (by Bmansurov):
Conform to schema

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

Patch-For-Review

Change 183321 merged by jenkins-bot:
Conform to schema

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

Jdlrobson closed this task as Resolved.Jan 7 2015, 11:40 PM
Jdlrobson added a subscriber: Jdlrobson.

Change 184006 had a related patch set uploaded (by Kaldari):
Conform to schema

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

Patch-For-Review

Change 184007 had a related patch set uploaded (by Kaldari):
Conform to schema

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

Patch-For-Review

Change 184007 merged by jenkins-bot:
Conform to schema

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

Change 184006 merged by jenkins-bot:
Conform to schema

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

I attempted to do this, earnestly, but found it a bit worrying so I talked to Ori and some researchers. Ori and I are in agreement that this feature is not as good of an idea as analytics-eng originally thought. One way to handle this would be to implement jsonschema union types (as opposed to just simple types we're using now), which would look something like this:

"type": ["boolean", "null"]

or

"type": ["string", "null"]

But that would require some dev work and we figure people would not be very likely to use it. For now, I'm going to pause work on this task and recommend that we keep null handling the way it is.