Add external intents for WebAPKs to Launch.HomeScreenSource |
|||||
Issue descriptionWebAPKs will be the first installed PWAs to be openable from external intents. It would be useful to break out that traffic source in Launch.HomeScreenSource.
,
Mar 24 2017
I think that's now the case!
,
Mar 27 2017
Hah, I just emailed Dominick about this :) +1 for implementing Separately can we tell how much time users spend in PWAs/WebAPKs? I think that would be an interesting measure to break out
,
Mar 31 2017
Time in PWAs would be interesting. I guess the best way to measure that is to stick a timer in WebApkActivity and turn it on and off at the appropriate times (onStop / onResume / onPause et al.)?
,
Mar 31 2017
We need to figure out when to record the metric. Recording the metric during the first onPause() sounds like an ok alternative
,
Mar 31 2017
There are some metrics already recorded for time spent in chrome but not entirely sure which histograms they're using. We should be sure to be consistent with that. +tedchoc - any idea where those are recorded?
,
Mar 31 2017
Did some digging. It's Session.TotalDuration called from UmaSessionStats.logAndEndSession
,
Apr 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a8a006c772c4a44469ae396ff01c2c835a48b670 commit a8a006c772c4a44469ae396ff01c2c835a48b670 Author: dominickn <dominickn@chromium.org> Date: Wed Apr 05 05:00:42 2017 Add external intents for WebAPKs to Launch.HomescreenSource. This CL adds a new EXTERNAL_INTENT source for WebAPK launches that are created by intenting from other Android apps. BUG= 691739 Review-Url: https://codereview.chromium.org/2790873002 Cr-Commit-Position: refs/heads/master@{#461982} [modify] https://crrev.com/a8a006c772c4a44469ae396ff01c2c835a48b670/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkConstants.java [modify] https://crrev.com/a8a006c772c4a44469ae396ff01c2c835a48b670/chrome/android/webapk/shell_apk/shell_apk_version.gni [modify] https://crrev.com/a8a006c772c4a44469ae396ff01c2c835a48b670/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/MainActivity.java [modify] https://crrev.com/a8a006c772c4a44469ae396ff01c2c835a48b670/chrome/browser/android/shortcut_info.h [modify] https://crrev.com/a8a006c772c4a44469ae396ff01c2c835a48b670/tools/metrics/histograms/histograms.xml
,
Apr 6 2017
I'm confused about that CL - it does capture deep links but is there a way that we detect clicks from the launcher? Or does that already fall under one of the existing buckets?
,
Apr 6 2017
SOURCE_UNKNOWN is the bucket for clicks from the launcher
,
Apr 7 2017
#c6: shouldn't clicks from the launcher have SOURCE_APP_BANNER or SOURCE_ADD_TO_HOMESCREEN_PWA? Or do WebAPKs override that? SOURCE_UNKNOWN should absolutely not be used for anything we want to accurately measure. It's going to include all legacy shortcuts created before we had sources monitored in UMA (<M45). Right now that bucket is hit >1.5 million times a day. I'd disregard anything in there - there's a reason why it's UNKNOWN - it's the default when we don't know any better.
,
Apr 7 2017
I don't think they do override it - but I was wondering if there was a way to distinguish WebAPK from old homescreen shortcut?
,
Apr 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/44c2c6431d328734d9507790eb8d1b9e08ece80e commit 44c2c6431d328734d9507790eb8d1b9e08ece80e Author: dominickn <dominickn@chromium.org> Date: Mon Apr 10 22:39:56 2017 Add EXTERNAL_INTENT as a non-homescreen launch option. WebappInfo#isLaunchedFromHomescreen() should return false for WebAPKs launched from an external intent. BUG= 691739 Review-Url: https://codereview.chromium.org/2806233002 Cr-Commit-Position: refs/heads/master@{#463424} [modify] https://crrev.com/44c2c6431d328734d9507790eb8d1b9e08ece80e/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
,
Apr 12 2017
The current state of WebAPKs in "Launch.HomeScreenSource": 1) if the WebAPK is launched from home screen, its source = 0 (SOURCE_UNKNOWN) when WebappLauncherActivity calls LaunchMetrics.recordHomeScreenLaunchIntoStandaloneActivity(). This is a bug and we should fix it. 2) if the WebAPK is launched from external Intent, it won't contribute to the "Launch.HomeScreenSource" for now, since SHORTCUT_SOURCE_EXTERNAL_INTENT hasn't handled in this metrics yet. How about add SOURCE_ADD_TO_HOMESCREEN_WEBAPK and SHORTCUT_SOURCE_EXTERNAL_INTENT as two new buckets in "Launch.HomeScreenSource"(https://cs.chromium.org/chromium/src/chrome/browser/android/metrics/launch_metrics.cc?rcl=6051193a1a2f5d7ad673326ba398324ad4975841&l=77)? For now, there two buckets will be WebAPKs only, so we can distinguish WebAPKs from PWA. For comment#7, how about add a "WebApk.Session.TotalDuration"? We can reuse the existing timer in ChromeActivity but record the time spent in WebApkAcitivity to our metrics, not Chrome's "Session.TotalDuration".
,
Apr 12 2017
Correct my comment in comment#14: the SHORTCUT_SOURCE_EXTERNAL_INTENT is already in "Launch.HomeScreenSource".
,
Apr 12 2017
,
May 3 2017
I think this is fixed now: we should be recording external intents correctly as of c#8, which made it into M59 (but not M58). Closing as Fixed, reopen if necessary. :) |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dominickn@chromium.org
, Feb 14 2017