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

Unified Diff: components/ntp_snippets/content_suggestions_metrics.cc

Issue 2668063004: [NTP::SectionOrder] Track category index after it has been moved up. (Closed)
Patch Set: tschumann@ comment. Created 3 years, 11 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/ntp_snippets/content_suggestions_metrics.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/content_suggestions_metrics.cc
diff --git a/components/ntp_snippets/content_suggestions_metrics.cc b/components/ntp_snippets/content_suggestions_metrics.cc
index b6c26ed20a829597a842ec91da8efffd00c26ef0..38860864bc854b192923f251d5c8419d9b12ad1b 100644
--- a/components/ntp_snippets/content_suggestions_metrics.cc
+++ b/components/ntp_snippets/content_suggestions_metrics.cc
@@ -55,6 +55,8 @@ const char kHistogramMoreButtonShown[] =
"NewTabPage.ContentSuggestions.MoreButtonShown";
const char kHistogramMoreButtonClicked[] =
"NewTabPage.ContentSuggestions.MoreButtonClicked";
+const char kHistogramMovedUpCategoryNewIndex[] =
+ "NewTabPage.ContentSuggestions.MovedUpCategoryNewIndex";
const char kHistogramCategoryDismissed[] =
"NewTabPage.ContentSuggestions.CategoryDismissed";
const char kHistogramContentSuggestionsTimeSinceLastBackgroundFetch[] =
@@ -330,6 +332,11 @@ void OnSuggestionTargetVisited(Category category, base::TimeDelta visit_time) {
base::UmaHistogramLongTimes(name, visit_time);
}
+void OnCategoryMovedUp(int new_index) {
+ UMA_HISTOGRAM_EXACT_LINEAR(kHistogramMovedUpCategoryNewIndex, new_index,
+ kMaxCategories);
+}
+
void OnMoreButtonShown(Category category, int position) {
// The "more" card can appear in addition to the actual suggestions, so add
// one extra bucket to this histogram.
« no previous file with comments | « components/ntp_snippets/content_suggestions_metrics.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698