Add UI Telemetry probes for Web Notifications to Fennec

NEW
Unassigned

Status

()

Firefox for Android
General
2 years ago
2 years ago

People

(Reporter: nalexander, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
As part of Bug 1259507, we're going to start collecting simple events when Push messages are subscribed to / unsubscribed to / received.  We expect most Push messages to result in user visible notifications that will bring users back into Fennec, but right now we have no UI Telemetry tracking if that happens.  (As far as I can see in https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/NotificationClient.java and https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/NotificationHelper.java.

This ticket tracks trying to make sense of and track (a subset of) the actions that can happen in a Web Notification context.
We'll need to add some telemetry when handling the PendingIntents that are created by the Notifications code (and possibly also add some kind of DeleteIntent) to either GeckoAppShell when the alert notification is created [1], or to NotificationHandler in general when it makes notifications [2].

The ACTION_ALERT_CALLBACK is the action of the intent and we can just add telemetry there [3], or in the process...() method if we want details about the alert itself.

[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java#1413
[2] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/NotificationHandler.java#58
[3] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java#1873
I assume we'll have a few situations we want to track:
1. Showing a Web Notification -> (SHOW, NOTIFICATION, <?>)
2. Tapping the Web Notification -> (ACTION, NOTIFICATION, <?>)
3. Is there a button on the notification? If so, tapping the button -> (ACTION, BUTTON, "notification-?")

Where "?" is something contextually relevant. In #1 and #2 it might be "web-notification".
You need to log in before you can comment on or make changes to this bug.