New issue
Advanced search Search tips

Issue 691739 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 710970
issue 711147



Sign in to add a comment

Add external intents for WebAPKs to Launch.HomeScreenSource

Project Member Reported by sbirch@chromium.org, Feb 13 2017

Issue description

WebAPKs 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.
 
I will do this once the metric has landed for  crbug.com/690266 

Comment 2 by sbirch@chromium.org, Mar 24 2017

I think that's now the case!
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


Cc: hanxi@chromium.org yfried...@chromium.org pkotw...@chromium.org
Owner: dominickn@chromium.org
Status: Started (was: Available)
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.)?


We need to figure out when to record the metric. Recording the metric during the first onPause() sounds like an ok alternative
Cc: tedc...@chromium.org
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?
Did some digging. It's Session.TotalDuration called from UmaSessionStats.logAndEndSession
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?
SOURCE_UNKNOWN is the bucket for clicks from the launcher
#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.
I don't think they do override it - but I was wondering if there was a way to distinguish WebAPK from old homescreen shortcut?
Project Member

Comment 13 by bugdroid1@chromium.org, 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

Comment 14 by hanxi@chromium.org, 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".


Comment 15 Deleted

Comment 16 by hanxi@chromium.org, Apr 12 2017

Correct my comment in comment#14: the SHORTCUT_SOURCE_EXTERNAL_INTENT is already in "Launch.HomeScreenSource".

Comment 17 by hanxi@chromium.org, Apr 12 2017

Blockedon: 710970
Blockedon: -710970
Blocking: 710970 711147
Any update on this bug?
Status: Fixed (was: Started)
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