Commit 17746d5d authored by Jesse Doherty's avatar Jesse Doherty Committed by Commit Bot

Log an action at the same time as the NewTabPage.MostVisited histogram.

The NewTabPage.MostVisited histogram is used as part of a high level guiding metric. We're trying to consolidate these metrics as user actions to improve query speeds and enable new analysis.

BUG=b/161525144

Change-Id: I25a0f4f90a8f11c14ae5dab22ad199917440d719
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2508133Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Jesse Doherty <jwd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822840}
parent dcd21502
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics.h"
#include "base/notreached.h" #include "base/notreached.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "components/ntp_tiles/constants.h" #include "components/ntp_tiles/constants.h"
...@@ -151,6 +152,7 @@ void RecordTileImpression(const NTPTileImpression& impression) { ...@@ -151,6 +152,7 @@ void RecordTileImpression(const NTPTileImpression& impression) {
void RecordTileClick(const NTPTileImpression& impression) { void RecordTileClick(const NTPTileImpression& impression) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.MostVisited", impression.index, UMA_HISTOGRAM_ENUMERATION("NewTabPage.MostVisited", impression.index,
kMaxNumTiles); kMaxNumTiles);
base::RecordAction(base::UserMetricsAction("NewTabPage.MostVisited.Clicked"));
std::string source_name = GetSourceHistogramName(impression.source); std::string source_name = GetSourceHistogramName(impression.source);
base::UmaHistogramExactLinear( base::UmaHistogramExactLinear(
......
...@@ -16091,6 +16091,22 @@ should be able to be added at any place in this file. ...@@ -16091,6 +16091,22 @@ should be able to be added at any place in this file.
</description> </description>
</action> </action>
<action name="NewTabPage.MostVisited.Clicked">
<owner>justincohen@chromium.org</owner>
<owner>mastiz@chromium.org</owner>
<owner>tiborg@chromium.org</owner>
<owner>yyushkina@chromium.org</owner>
<owner>chrome-analysis-team@google.com</owner>
<owner>chrome-desktop-ntp@google.com</owner>
<description>
The user clicked on a most visited tile. This action is logged every time
the NewTabPage.MostVisited histogram is logged.
This action is of special interest to the chrome-analysis-team@. Do not
change its semantics or retire it without talking to them first.
</description>
</action>
<action name="NewTabPage.Promo.EnhancedProtectionPromo.Accepted"> <action name="NewTabPage.Promo.EnhancedProtectionPromo.Accepted">
<owner>bdea@chromium.org</owner> <owner>bdea@chromium.org</owner>
<owner>chrome-safebrowsing-alerts@google.com</owner> <owner>chrome-safebrowsing-alerts@google.com</owner>
......
...@@ -843,6 +843,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -843,6 +843,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
Histogram for user clicks of the most visited tile. The value is equal to Histogram for user clicks of the most visited tile. The value is equal to
the index of the tile. the index of the tile.
The user action NewTabPage.MostVisited.Clicked is also logged at the same
time as this histogram.
This histogram is of special interest to the chrome-analysis-team@. Do not This histogram is of special interest to the chrome-analysis-team@. Do not
change its semantics or retire it without talking to them first. change its semantics or retire it without talking to them first.
</summary> </summary>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment