Page MenuHomePhabricator

Instrument opening of cross-wiki notification GroupItems
Closed, ResolvedPublic

Description

We should make sure we have EventLogging that logs when someone opens a cross-wiki notification group item, so we can see how many people use this feature. Once T121929: Clicking a NotificationGroupItem should expand it is fixed, I imagine we might already be sending notification-link-click events with an ID of -1, but it would be good to have a clear, separate action logged for this as well.

Also related: T120158: Fix EventLogging for cross-wiki notifications

Details

Related Gerrit Patches:
mediawiki/extensions/Echo : masterLog the expand action of a notification group item

Event Timeline

Catrope created this task.Dec 19 2015, 12:18 AM
Catrope raised the priority of this task from to High.
Catrope updated the task description. (Show Details)
Catrope added a subscriber: Catrope.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 19 2015, 12:18 AM

There's another issue here, though -- we need to add the wiki name to the logging schema, so we can log where the bundle came from.

I think we can start only by logging "a bundle was clicked" (no matter where/what and how many items were clicked *inside it*) as this ticket suggests, but we should make sure we also log the sub-items, being clicked (and their "impressions") but for that, we'll have to change the logging schema or it won't make a lot of sense, especially since notification items may have the same IDs in different wikis.

Change 260772 had a related patch set uploaded (by Mooeypoo):
Log the expand action of a notification group item

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

Change 260772 merged by jenkins-bot:
Log the expand action of a notification group item

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

SBisson assigned this task to Mooeypoo.Jan 12 2016, 6:15 PM
SBisson set Security to None.
Etonkovidova added a subscriber: Etonkovidova.EditedJan 28 2016, 9:56 PM

Checked in s3-analytics-slave - I do not see in ''revision' => 15180901 the events such as

notificationClick: 'notification-link-click',
notificationBundleExpand: 'notification-bundle-expand',
notificationImpression: 'notification-impression,

mysql:research@s3-analytics-slave [log]> select distinct( event_notificationType) from EchoInteraction_15180901;
+--------------------------------+
| event_notificationType         |
+--------------------------------+
| NULL                           |
| reverted                       |
| edit-thank                     |
| edit-user-talk                 |
| article-linked                 |
| system                         |
| mention                        |
| flow-discussion                |
| message                        |
| alert                          |
| page-review                    |
| page-linked                    |
| user-rights                    |
| pagetriage-mark-as-reviewed    |
| cx                             |
| welcome                        |
| education-program              |
| flow-new-topic                 |
| pagetriage-add-maintenance-tag |
| cx-tenth-translation           |
| flow-post-reply                |
| emailuser                      |
| pagetriage-add-deletion-tag    |
| cx-first-translation           |
| flow-thank                     |
| flow-topic-renamed             |
| ep-course-talk-notification    |
| ep-student-add-notification    |
| other                          |
| flow-post-edited               |
| unsubscribe-bouncehandler      |
| flow-mention                   |
| flow-enabled-on-talkpage       |
| cx-hundredth-translation       |
| ep-online-add-notification     |
| ep-instructor-add-notification |
+--------------------------------+
36 rows in set (9.31 sec)

Note: Is it normal to have NULL for event_NotificationType?

mysql:research@s3-analytics-slave [log]> select count(*) from EchoInteraction_15180901 where event_notificationType is NULL and event_userId in (27425, 30833);
+----------+
| count(*) |
+----------+
|      223 |
+----------+
1 row in set (25.03 sec)

Console stack for clicking in Notification flyout:

[EchoInteraction] Missing or empty schema
(anonymous function)
fire
self.fireWith
self.fire
mw.track
self.prepare
self.logEvent
(anonymous function)
fire
self.add
mw.echo.Logger.logInteraction
mw.echo.Logger.logNotificationImpressions
mw.echo.ui.NotificationsWidget.onModelNotificationDone
oo.EventEmitter.emit
then.model.emit.errCode

Note: Is it normal to have NULL for event_NotificationType?

Yes. It is only for notification- actions, not the ui- ones: "Type of notification, matching definitions from Schema:Echo. This is only available for notification-* actions."

action should always be present, though (otherwise, it's a bug, and shouldn't validate).

Console stack for clicking in Notification flyout:

[EchoInteraction] Missing or empty schema

This is definitely a bug, though.

Console stack for clicking in Notification flyout:

[EchoInteraction] Missing or empty schema
(anonymous function)
fire
self.fireWith
self.fire
mw.track
self.prepare
self.logEvent
(anonymous function)
fire
self.add
mw.echo.Logger.logInteraction
mw.echo.Logger.logNotificationImpressions
mw.echo.ui.NotificationsWidget.onModelNotificationDone
oo.EventEmitter.emit
then.model.emit.errCode

Oh which wiki did you see this? I can't reproduce this in beta labs, or on English Wikipedia.

Catrope closed this task as Resolved.Mar 16 2016, 12:07 AM