<!--
Copyright 2020 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!--
This file is used to generate a comprehensive list of WebApk histograms
along with a detailed description for each histogram.
For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md
Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
[email protected].
-->
<histogram-configuration>
<histograms>
<variants name="WebApkDistributorType">
<variant name=".Browser" summary="Installed by Chrome"/>
<variant name=".DevicePolicy" summary="Installed by device policy"/>
<variant name=".Other" summary="Installed by other sources"/>
</variants>
<histogram name="WebApk.AppIdentityDialog.PendingImageUpdateDiffValue"
units="%" expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records how much different the before and after images are during the webapp
update process (for non-scaled images only -- see also metric
PendingImageUpdateDiffValueScaled). Recorded each time the update process
detects an image change, except for instances where the update is still
pending when the update process runs again (already approved images).
</summary>
</histogram>
<histogram name="WebApk.AppIdentityDialog.PendingImageUpdateDiffValueScaled"
units="%" expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records how much different the before and after images are during the webapp
update process, when one of them has been scaled. Recorded each time the
update process detects an image change, except for instances where the
update is still pending when the update process runs again (already approved
images).
</summary>
</histogram>
<histogram name="WebApk.Database.WriteResult" enum="Boolean"
expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>Records the write result (boolean) in WebApkDatabase.</summary>
</histogram>
<histogram name="WebApk.Install.GooglePlayErrorCode"
enum="WebApkInstallGooglePlayErrorCode" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records the error code when installing a WebAPK from Google Play fails. See
go/webapk-install-googleplayerrorcode.
</summary>
</histogram>
<histogram name="WebApk.Install.GooglePlayInstallResult"
enum="WebApkGooglePlayInstallResult" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records whether installing a WebAPK from Google Play succeeded. If not,
records the reason that the install failed.
</summary>
</histogram>
<histogram name="WebApk.Install.InstallDuration" units="ms"
expires_after="2023-09-10">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
How long it takes to install a WebAPK. The time is measured from the time
that the user initiates the install to the time that the Open button is
shown in the infobar. This metric is only recorded when install succeeds.
</summary>
</histogram>
<histogram name="WebApk.Install.InstallEvent" enum="WebApkInstallEvent"
expires_after="2025-01-26">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
WebAPKs are PWAs wrapped in an Android apk, installed from an app banner or
the add to homescreen menu item. This stat tracks WebAPK installation
events.
</summary>
</histogram>
<histogram name="WebApk.Install.InstallResult" enum="WebApkInstallResult"
expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Record whether installing a WebAPK succeeded. If not record the reason that
the install failed.
</summary>
</histogram>
<histogram name="WebApk.Install.PathToInstall" enum="PwaInstallPath"
expires_after="2025-01-26">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records the path that the user took to reach install point for PWAs. This
can be via the Install Modal or the new BottomSheet and may involve the
in-product help (IPH) showing. Recorded once per install of a PWA, at the
time the PWA is installed.
</summary>
</histogram>
<histogram name="WebApk.Install.RequestTokenDurationV2" units="ms"
expires_after="2025-01-19">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records the amount of time which has elapsed from the "install infobar
showing" to the "install request being sent to Google Play".
This time includes the time that it takes to request the WebAPK token and
the time that it takes to compute the hashes for the launcher icon and the
badge icon.
</summary>
</histogram>
<histogram name="WebApk.InstallPrompt.SegmentationResult"
enum="SegmentationResult" expires_after="2025-02-02">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
When Segmentation Platform returns the install prompt classification result,
record an enum for whether the result is invalid, show the prompt, or don't
show.
</summary>
</histogram>
<histogram name="WebApk.Launch.NetworkError" enum="NetErrorCodes"
expires_after="2024-06-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records the error codes when a WebAPK is launched with network failures.
</summary>
</histogram>
<histogram name="WebApk.LaunchFromViewIntent" enum="Boolean"
expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records every WebApk launch attempt originating from a view intent in
LaunchIntentDispatcher. A value of "true" indicates a successful
launch, while a value of "false" indicates a failure.
</summary>
</histogram>
<histogram name="WebApk.Notification.Permission.Status2" enum="ContentSetting"
expires_after="2025-01-23">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
When a WebAPK receives a notification, log whether it has permission to
display that notification.
</summary>
</histogram>
<histogram name="WebApk.Notification.PermissionRequestResult"
enum="ContentSetting" expires_after="2025-01-23">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
The result of a WebAPK notification permission request for the purpose of
notification delegation. This is logged when the
NotificationPermissionUpdater receives the result from the
WebApkServiceClient.
</summary>
</histogram>
<histogram name="WebApk.Session.TotalDuration3{WebApkDistributorType}"
units="ms" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
The length of a WebAPK session (launch/foregrounding to backgrounding) in
milliseconds. {WebApkDistributorType}
</summary>
<token key="WebApkDistributorType" variants="WebApkDistributorType"/>
</histogram>
<histogram name="WebApk.ShellApkVersion2{WebApkDistributorType}" units="units"
expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records WebAPK "Shell APK version" when the WebAPK is launched.
The "Shell APK version" is documented in
chrome/android/webapk/shell_apk/current_version/current_version.gni
{WebApkDistributorType}
</summary>
<token key="WebApkDistributorType" variants="WebApkDistributorType"/>
</histogram>
<histogram name="WebApk.Startup.Cold.NewStyle.ShellLaunchToSplashscreenVisible"
units="ms" expires_after="2024-06-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Tracks the time to splash screen visible starting from the launch of the
WebAPK shell (rather than from the launch of Chrome) for new-style WebAPKs.
The WebAPK shell displays the splash screen for new-style WebAPKs.
This is recorded iff: - This is a cold startup of Chrome. - Chrome has not
been sent to the background since launch. - There was no recents entry for
Chrome (Android replays intents if a recents entry exists), which otherwise
adds noise/long-tail to this histogram.
</summary>
</histogram>
<histogram name="WebApk.Startup.Cold.ShellLaunchToSplashscreenVisible"
units="ms" expires_after="2024-06-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Tracks the time to splashscreen visible starting from the launch of the
WebAPK shell (rather than from the launch of Chrome). The splashscreen is
shown during postInflationStartup.
This is recorded iff: - This is a cold startup of Chrome. - Chrome has not
been sent to the background since launch. - There was no recents entry for
Chrome (android replays intents if a recents entry exists), which otherwise
adds noise/long-tail to this histogram.
</summary>
</histogram>
<histogram name="WebApk.Sync.Restore.FetchInstallableData.AppType"
enum="WebApkAppType" expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
When user selected to restore a WebAPK from sync data, we will try to fetch
the installable data from the website. Record the type of the app from the
installable check result.
</summary>
</histogram>
<histogram name="WebApk.Sync.Restore.FetchInstallableData.NotWebApkStatusCode"
enum="InstallableStatusCode" expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
When user selected to restore a WebAPK from sync data, we will try to fetch
the installable data from the website. If the fetched result is not a valid
WebAPK, record the status code from the installable check.
</summary>
</histogram>
<histogram name="WebApk.Sync.Restore.InstallEvent"
enum="WebApkRestoreFallbackReason" expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
When user selected to restore a WebAPK from sync data, we will try to fetch
the installable data from the website. If the fetched result is not
installable, we will use the sync data as fallback. Records whether a
fallback is used and the reason for using fallback.
</summary>
</histogram>
<histogram name="WebApk.Sync.Restore.InstallResult.{RestoreType}"
enum="WebApkInstallResult" expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
When installing the sync restored WebAPK finished, records a enum for the
install result.
</summary>
<token key="RestoreType">
<variant name="Fallback"/>
<variant name="Fetched"/>
</token>
</histogram>
<histogram name="WebApk.Sync.SyncedWebApkAddition"
enum="WebApkSyncAddOrModifyType" expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records additions and modifications to the WebAPK Sync database. In
particular, this keeps track of whether the addition is new on the device
(vs just a launch of an existing WebAPK) and whether it's new to the Sync
database (vs a modification of an existing item). Recorded every time a
WebAPK is installed or launched.
</summary>
</histogram>
<histogram name="WebApk.Sync.SyncedWebApkCount" units="WebApks"
expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records a count of the number of WebAPKs in the WebAPK Sync database.
Recorded when the WebAPK Database is opened, which happens on every Chrome
launch on Android.
</summary>
</histogram>
<histogram name="WebApk.Sync.SyncedWebApkRemovalCount" units="WebApks"
expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records the number of WebAPKs that get removed from the WebAPK Sync
database. Recorded when removing a WebAPK from the Sync database, which
happens when an unused WebAPK is uninstalled, or when Chrome is launched on
Android when expired WebAPK entries exist in Sync.
</summary>
</histogram>
<histogram name="WebApk.Uninstall{WebApkDistributorType}" enum="BooleanHit"
expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records that a WebAPK was uninstalled. {WebApkDistributorType}
</summary>
<token key="WebApkDistributorType" variants="WebApkDistributorType"/>
</histogram>
<histogram name="WebApk.UniversalInstall.DialogAction"
enum="UniversalInstallDialogActions" expires_after="2025-02-23">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records what happens in the Universal Install dialog (dialog opened, app
installed, shortcut created, etc). Recorded once per action taken in the
dialog.
</summary>
</histogram>
<histogram name="WebApk.UniversalInstall.DialogShownForAppType"
enum="WebApkAppType" expires_after="2025-02-23">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records which app type the Universal Install dialog was shown. Recorded once
per dialog shown, after we've figured out which type app it is. Note: In
versions prior to 125 this metric overcounted app types in scenarios where
the dialog redirects to the install dialog (instead of showing) because we
detect that only one action was meaningful to the user.
</summary>
</histogram>
<histogram name="WebApk.UniversalInstall.TimeoutWithAppType"
enum="WebApkAppType" expires_after="2025-02-23">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records which app types were detected when the Universal Install dialog was
shown after timing out. Recorded once per dialog shown, but only if a
timeout has occured before figuring out which type app it is.
</summary>
</histogram>
<histogram name="WebApk.UniversalInstall.{AppType}.AppDataFetchTime" units="ms"
expires_after="2025-02-23">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records how long it takes (in milliseconds per {AppType}), from the time the
dialog is requested until the application data has been fetched. Note that
this does not reflect actual time it takes the installability check to
finish, because it will run in the background before the dialog starts, and
might even have completed before the dialog is requested. Recorded once per
dialog (right after the application data becomes available).
</summary>
<token key="AppType">
<variant name="Homebrew"/>
<variant name="Shortcut"/>
<variant name="WebApk"/>
</token>
</histogram>
<histogram name="WebApk.Update.GooglePlayUpdateResult"
enum="WebApkGooglePlayInstallResult" expires_after="2024-06-30">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records whether updating a WebAPK from Google Play succeeded. If not,
records the reason that the update failed.
</summary>
</histogram>
<histogram name="WebApk.Update.NumStaleUpdateRequestFiles" units="files"
expires_after="2024-10-06">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records the number of zombie "WebAPK update request" files that
the update process failed to cleanup. Recorded for all WebAPKs whenever a
WebAPK or webapp is launched.
</summary>
</histogram>
<histogram name="WebApk.Update.RequestSent" enum="WebApkUpdateRequestSent"
expires_after="2024-02-20">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records the time point when a request to update a WebAPK is sent to the
WebAPK Server.
</summary>
</histogram>
<histogram name="WebApk.Update.ShellVersion" units="units"
expires_after="2025-01-01">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
When a WebAPK update request was queued, records the current WebAPK's
"Shell APK version" The "Shell APK version" is
documented in
chrome/android/webapk/shell_apk/current_version/current_version.gni
</summary>
</histogram>
<histogram name="WebApk.Update.UpdateEmptyUniqueId.NeedsUpgrade" enum="Boolean"
expires_after="2025-02-23">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
For WebAPK unique ID migration, record whether an update is neede (with
non-empty update reason). This only records for the first legacy update that
updates the WebAPK from an empty id.
</summary>
</histogram>
<histogram name="WebApk.WebappRegistry.NumberOfOrigins" units="count"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>src/chrome/android/webapk/OWNERS</owner>
<summary>
Records number of unique origins for WebAPKs that have been added to
WebappRegistry. This is recorded each time on Chrome startup, after the
WebappRegistry is initialized.
</summary>
</histogram>
</histograms>
</histogram-configuration>