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

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: 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";
Marc Treib 2017/02/01 13:04:23 ".CategoryMovedUpNewIndex"?
vitaliii 2017/02/01 13:30:18 I like previous one more. Which category? Moved u
Marc Treib 2017/02/01 13:40:46 Ah, I wasn't aware of OpenedCategoryIndex. I guess
vitaliii 2017/02/01 14:19:37 Acknowledged.
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);
Marc Treib 2017/02/01 13:04:23 Hm. I guess you'd mostly look at the number of sam
vitaliii 2017/02/01 13:30:18 Partially true. We are worried that top most categ
Marc Treib 2017/02/01 13:40:46 Alright, fair enough.
Marc Treib 2017/02/01 13:42:37 (About tracking only the top 3 or something: No, i
vitaliii 2017/02/01 14:19:37 Acknowledged. The mention of top 3 was to explain
+}
+
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