Page MenuHomePhabricator

Android send action = app_open events to product_metrics_app_base
Closed, ResolvedPublic5 Estimated Story Points

Description

In order for us to have a unified DAU/MAU source of truth for retention metrics we want to track app_open events on product_metrics_app_base

If possible/relevant we should use column action_source to indicate where user opened app - this can be used to track widget opens and for iOS background/foreground opens.

We will be using this event for DAU/MAU so we want to track as many app opens as necessary without overloading with extra unnecessary events. Therefore we will track any open event from an EXTERNAL source, example source values:

action_source = external_link
If the user is browsing the web in the Chrome app, then taps a Wikipedia link, which causes the app to launch and view the article. We should send an app_open event whenever we handle an incoming link from an external app.

action_source = background
If the user switches back to Chrome, putting our app in the background (but very much still running), then later taps another Wikipedia link, bringing our app back to the foreground that is another app_open.

action_source = widget
We should send an app_open event whenever a widget causes the app to show a screen, IF app is not already open.

action_source = shortcut
Similar to widget whenever a shortcut causes the app to show a screen, IF app is not already open.

action_source = notification
Tapping on a push notification can open various screens of the app, , IF app is not already open.

action_source = app_icon
Tapping on the actual app icon on your phone's launcher screen opens the Main screen.

Use apps-open for the instrument name

Event Timeline

SNowick_WMF renamed this task from Android send action = app_open event to app_base to Android send action = app_open events to app_base.Apr 17 2026, 4:30 PM
SNowick_WMF renamed this task from Android send action = app_open events to app_base to Android send action = app_open events to product_metrics_app_base.
SNowick_WMF added a subscriber: Seddon.

(both apps teams will need to agree on the instrument_name for this.)

let's use apps-open for the instrument name

@SNowick_WMF
Could we also be more precise about what we mean by "app open"? The app has a number of different screens, each of which handles different tasks, each of which can be "opened" independently of each other.
To run through a few examples:

  • Reading articles: If the user is browsing the web in the Chrome app, then taps a Wikipedia link, which causes the app to launch and view the article, presumably that's an app_open? And then the user switches back to Chrome, putting our app in the background (but very much still running), then later taps another Wikipedia link, bringing our app back to the foreground, is that another app_open?
    • So then, are we saying that we should send an app_open event whenever we handle an incoming link from an external app?
  • Widgets: Are we saying that we should send an app_open event whenever a widget causes the app to show a particular screen, regardless of which screen it is, and regardless if the app is already running?
    • Same for App Shortcuts.
  • Notifications: Tapping on a push notification can open various screens of the app, depending on the type of notification. Is each of those a potential app_open?
  • Home screen: Tapping on the actual app icon on your phone's launcher screen opens the Main screen. I'm guessing that's also an app_open.

....or are we talking about sending an app_open event whenever any screen of the app comes to the foreground, for any reason? If I'm reading an article, then switch over to TikTok, then switch back to our app, is that an app_open?

Thanks for feedback @Dbrant - added sources to main task

Dbrant set the point value for this task to 5.May 4 2026, 5:27 PM

Hi @SNowick_WMF

There's feedback from code review:

This one is kind of confusing: When exactly does this get fired? For what kinds of situations? If it gets fired whenever any activity receives a new Intent, then why is it called "background"?

Reading the task, it says the following for background:

If the user switches back to Chrome, putting our app in the background (but very much still running), then later taps another Wikipedia link, bringing our app back to the foreground that is another app_open.

...But isn't this already handled with the external_link event? What is this adding?


It looks like the background event is not clear in the app behavior. Do we want to only do for external_link when it's coming from the deeplinks? If we are also thinking about widgets or notifications, then we can keep this background event; if not, I would suggest removing this background event since it will be a duplicated event as the external_link.

ABorbaWMF added a subscriber: cooltey.

@SNowick_WMF - Assigning to you for testing