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

Unified Diff: components/ntp_snippets/content_suggestions_metrics.cc

Issue 2510053002: Add a count for Suggested Articles usage. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | tools/metrics/actions/actions.xml » ('j') | tools/metrics/actions/actions.xml » ('J')
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 a19fef36e28515a902349a65dc13b4d65e9b6d1c..b96dfce4b74bda896fa30a47e656328bb82cf812 100644
--- a/components/ntp_snippets/content_suggestions_metrics.cc
+++ b/components/ntp_snippets/content_suggestions_metrics.cc
@@ -9,9 +9,13 @@
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_macros.h"
+#include "base/metrics/user_metrics.h"
#include "base/strings/stringprintf.h"
#include "base/template_util.h"
+using base::RecordAction;
+using base::UserMetricsAction;
Marc Treib 2016/11/17 11:10:23 nit: I'd prefer specifying the "base::" in the one
markusheintz_ 2016/11/17 13:48:47 done
+
namespace ntp_snippets {
namespace metrics {
@@ -173,9 +177,11 @@ void RecordContentSuggestionsUsage() {
size_t bucket =
(now_exploded.hour * 60 + now_exploded.minute) / kBucketSizeMins;
- UMA_HISTOGRAM_ENUMERATION(kHistogramUsageTimeLocal, bucket, kNumBuckets);
+ UMA_HISTOGRAM_ENUMERATION(kHistogramArticlesUsageTimeLocal, bucket,
Marc Treib 2016/11/17 11:10:23 Bad rebase? You renamed the constant here, but not
markusheintz_ 2016/11/17 13:48:46 Done.
+ kNumBuckets);
- LOG(ERROR) << " ****************** Zine Usage";
+ RecordAction(
+ UserMetricsAction("NewTabPage_ContentSuggestions_ArticlesUsageCount"));
Marc Treib 2016/11/17 11:10:23 "Count" is implied by the fact that it's a UserAct
markusheintz_ 2016/11/17 13:48:46 Done.
}
} // namespace
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | tools/metrics/actions/actions.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698