<!--
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 Payment 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>
<histogram name="PaymentRequest.CanMakePayment.CallAllowedByPref"
enum="Boolean" expires_after="2025-01-26">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Whether or not a call to the PaymentRequest.canMakePayment() API was allowed
by the kCanMakePaymentEnabled user preference. This histogram does not
reflect what the outcome of the canMakePayment call would have been, only if
it was allowed or blocked by the preference. It is recorded once per
PaymentRequest.canMakePayment call.
</summary>
</histogram>
<histogram name="PaymentRequest.CheckoutFunnel"
enum="PaymentRequestCheckoutFunnelSteps" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Counts the number of Payment Requests (PR) that go through each checkout
step. A single PR may be counted in multiple buckets depending on its final
status. e.g. A completed PR will be counted in all of the following buckets
1- Initiated, 2- show() called 3- Payment request triggered 4- Payment
handler invoked, 5- Completed.
</summary>
</histogram>
<histogram name="PaymentRequest.EventResponse.CanMakePayment" enum="Boolean"
expires_after="2024-02-20">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
A payment handler's response to the "canmakepayment" event in its
service worker. The event is fired when "new PaymentRequest()" is
called in JavaScript, but only for URL-based payment methods, only for
already installed payment handlers, and only when not in private browsing
mode. The response from "canmakepayment" is expected to be
"true" in the majority of cases. The value of "false"
could be either the payment handler refusing to make payments or an internal
error, which should both be rare.
</summary>
</histogram>
<histogram name="PaymentRequest.Events2" units="bitfield value"
expires_after="2025-05-19">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The 2.0 version of Events. A bitfield representing the different events that
happened during the Payment Request.
</summary>
</histogram>
<histogram name="PaymentRequest.HasEnrolledInstrument.CallAllowedByPref"
enum="Boolean" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Whether or not a call to the PaymentRequest.hasEnrolledInstrument() API was
allowed by the kCanMakePaymentEnabled user preference. This histogram does
not reflect what the outcome of the hasEnrolledInstrument call would have
been, only if it was allowed or blocked by the preference. It is recorded
once per PaymentRequest.hasEnrolledInstrument call.
</summary>
</histogram>
<histogram
name="PaymentRequest.IsCanMakePaymentAllowedByPref.PaymentRequestConstruction.Once"
enum="Boolean" expires_after="2024-11-27">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Whether or not the 'payments.can_make_payment_enabled' pref is enabled when
a PaymentRequest object is constructed. Recorded only when a PaymentRequest
object is first constructed, and approximately once per startup
(specifically, once per BrowserContext).
The difference between this histogram and
PaymentRequest.IsCanMakePaymentAllowedByPref.Startup is that this histogram
is only recorded if/when the user visits a page that constructs a
PaymentRequest object, which means that it sub-selects for users who are
likely to be in a payment context.
</summary>
</histogram>
<histogram
name="PaymentRequest.IsCanMakePaymentAllowedByPref.PaymentRequestConstruction.Once.DisabledReason"
enum="CanMakePaymentPreferenceSetter" expires_after="2025-02-02">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
When the 'payments.can_make_payment_enabled' pref is disabled, this records
the reason why (e.g., by the user, an extension, etc). Recorded only when a
PaymentRequest object is first constructed, and approximately once per
startup (specifically, once per BrowserContext).
The difference between this histogram and
PaymentRequest.IsCanMakePaymentAllowedByPref.Startup.DisabledReason is that
this histogram is only recorded if/when the user visits a page that
constructs a PaymentRequest object, which means that it sub-selects for
users who are likely to be in a payment context.
</summary>
</histogram>
<histogram name="PaymentRequest.IsCanMakePaymentAllowedByPref.Startup"
enum="Boolean" expires_after="2025-01-26">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Whether or not the 'payments.can_make_payment_enabled' pref is enabled.
Recorded once per profile load/creation (approximately once per start-up for
a normal browsing session).
</summary>
</histogram>
<histogram
name="PaymentRequest.IsCanMakePaymentAllowedByPref.Startup.DisabledReason"
enum="CanMakePaymentPreferenceSetter" expires_after="2025-01-26">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
When the 'payments.can_make_payment_enabled' pref is disabled, this records
the reason why (e.g., by the user, an extension, etc). Recorded once per
profile load/creation (approximately once per start-up for a normal browsing
session).
</summary>
</histogram>
<histogram name="PaymentRequest.JourneyLoggerHasRecorded" enum="Boolean"
expires_after="2023-09-03">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Whether a journey logger has recorded an events bit field or not.
</summary>
</histogram>
<histogram name="PaymentRequest.JourneyLoggerHasRecordedMultipleTimes"
enum="Boolean" expires_after="2022-11-22">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
When a journey logger attempts to record multiple events bit fields.
</summary>
</histogram>
<histogram name="PaymentRequest.NumberOfSuggestionsShown" units="units"
expires_after="2022-11-22">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of suggestions shown to the user during a payment request.
</summary>
</histogram>
<histogram name="PaymentRequest.NumberOfSupportedMethods.AndroidApp"
units="methods" expires_after="2023-07-14">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of payment methods that an installed Android payment app declares
to support. Recorded when a website creates a new PaymentRequest JS object.
</summary>
</histogram>
<histogram name="PaymentRequest.PaymentHandlerInstallSuccess"
enum="BooleanSuccess" expires_after="2025-02-23">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Whether an attempted just-in-time payment handler installation was
successful. Recorded when the attempted installation is finished.
</summary>
</histogram>
<histogram name="PaymentRequest.PrePurchaseQuery"
enum="PaymentRequestPrePurchaseQuery" expires_after="2023-09-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
A count of the number of queries to the payment apps of different types,
where the query happens before the purchase flow is initiated. Recorded when
a PaymentRequest object is constructed with payment method parameters that
match with the already installed payment apps on the user device.
</summary>
</histogram>
<histogram
name="PaymentRequest.SecurePaymentConfirmationCredentialIdSizeInBytes"
units="bytes" expires_after="2023-06-18">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the size of Credential ID for secure-payment-confirmation method in
bytes.
</summary>
</histogram>
<histogram name="PaymentRequest.Show.TryShowOutcome"
enum="PaymentRequestTryShowOutcome" expires_after="2025-01-22">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The outcome of trying to show the PaymentRequest UI in response to
PaymentRequest.show(), with regards only to whether the call is blocked due
to an existing PaymentRequest.show() call being underway either in the same
or another tab.
Recorded per 'valid' call to PaymentRequest.show() - that is, does not
include calls where show() was called twice on the same object, or the
PaymentRequest wasn't initialized first, etc.
Whether this metric records the show being allowed or not, it is important
to note that there are subsequent steps in actually showing the
PaymentRequest that may or could still fail. For example, the request could
be being made from a background tab, which is checked later after this
metric is recorded. As such, interpret this metric with care - it cannot be
read as "these calls succeed and these calls do not"!
</summary>
</histogram>
</histograms>
</histogram-configuration>