Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1117)

Unified Diff: components/payments/core/journey_logger.cc

Issue 2892833002: [Payments] Use event to log checkout funnel metrics. (Closed)
Patch Set: Nit Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/payments/core/journey_logger.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/core/journey_logger.cc
diff --git a/components/payments/core/journey_logger.cc b/components/payments/core/journey_logger.cc
index aeae9aa0652bf7083c6e76c8c5f482a4c06a61d4..953e307dd2d572357c16eb0c691bc31fc18ab000 100644
--- a/components/payments/core/journey_logger.cc
+++ b/components/payments/core/journey_logger.cc
@@ -116,6 +116,8 @@ void JourneyLogger::RecordJourneyStatsHistograms(
DCHECK(!has_recorded_);
has_recorded_ = true;
+ RecordCheckoutFlowMetrics();
+
RecordSectionSpecificStats(completion_status);
// Record the CanMakePayment metrics based on whether the transaction was
@@ -125,6 +127,23 @@ void JourneyLogger::RecordJourneyStatsHistograms(
RecordUrlKeyedMetrics(completion_status);
}
+void JourneyLogger::RecordCheckoutFlowMetrics() {
+ UMA_HISTOGRAM_BOOLEAN("PaymentRequest.CheckoutFunnel.Initiated", true);
+
+ if (events_ & EVENT_SHOWN)
+ UMA_HISTOGRAM_BOOLEAN("PaymentRequest.CheckoutFunnel.Shown", true);
+
+ if (events_ & EVENT_PAY_CLICKED)
+ UMA_HISTOGRAM_BOOLEAN("PaymentRequest.CheckoutFunnel.PayClicked", true);
+
+ if (events_ & EVENT_RECEIVED_INSTRUMENT_DETAILS)
+ UMA_HISTOGRAM_BOOLEAN(
+ "PaymentRequest.CheckoutFunnel.ReceivedInstrumentDetails", true);
+
+ if (events_ & EVENT_SKIPPED_SHOW)
+ UMA_HISTOGRAM_BOOLEAN("PaymentRequest.CheckoutFunnel.SkippedShow", true);
+}
+
void JourneyLogger::RecordSectionSpecificStats(
CompletionStatus completion_status) {
// Record whether the user had suggestions for each requested information.
« no previous file with comments | « components/payments/core/journey_logger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698