Page MenuHomePhabricator

iOS send action = app_open events to product_metrics_app_base
Closed, ResolvedPublic2 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

Test Steps

Build: main (not Experimental) TestFlight 8.1.0 (6045).

  1. Enable dev settings toggle "Send analytics to wmflabs".
  2. Go to https://stream.wikimedia.beta.wmflabs.org/v2/ui/#/

Watch for events with Stream: "product_metrics.app_base", Instrument name: "apps-open"

Event Timeline

@SNowick_WMF I was able to send action_source, so far I mapped these values below, let me know if this looks good:

foreground (when the app activates in a "regular" way)
deeplink
widget_{name_of_widget} (ex: widget_reading_challenge)

Sample event

Screenshot 2026-04-24 at 10.31.43.png (1,012×1,254 px, 236 KB)

I'm moving the task to needs code review, but let me know if you need any changes and I can update the PR/do any fixes

@Tsevener I added the changes Shay added to the description and addressed your comments in the PR.

It needs more testing, so it might require some fixes. Moving to code review so you can take a look.

RESOLVED we aren't using this value in latest version

//@Mazevedo Note the value for deeplink appears in data as deepLink - low priority but may want to fix so everything is in lower case.

Also when you have time can you add a description to the task that explains what action_sources deeplink and foreground so we have documentation. I am seeing events for everything except notification, will note in validation task as well.

Thanks for pushing this through so quickly! //