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

Unified Diff: components/ntp_snippets/content_suggestions_metrics.cc

Issue 2510053002: Add a count for Suggested Articles usage. (Closed)
Patch Set: sync 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') | 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 a19fef36e28515a902349a65dc13b4d65e9b6d1c..bfccb3b0dab0d7959817fb5715fd2c40b2698d2f 100644
--- a/components/ntp_snippets/content_suggestions_metrics.cc
+++ b/components/ntp_snippets/content_suggestions_metrics.cc
@@ -9,6 +9,7 @@
#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"
@@ -40,7 +41,7 @@ const char kHistogramDismissedUnvisited[] =
"NewTabPage.ContentSuggestions.DismissedUnvisited";
const char kHistogramDismissedVisited[] =
"NewTabPage.ContentSuggestions.DismissedVisited";
-const char kHistogramUsageTimeLocal[] =
+const char kHistogramArticlesUsageTimeLocal[] =
"NewTabPage.ContentSuggestions.UsageTimeLocal";
const char kHistogramVisitDuration[] =
"NewTabPage.ContentSuggestions.VisitDuration";
@@ -173,9 +174,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,
+ kNumBuckets);
- LOG(ERROR) << " ****************** Zine Usage";
+ base::RecordAction(
+ base::UserMetricsAction("NewTabPage_ContentSuggestions_ArticlesUsage"));
}
} // namespace
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698