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

Unified Diff: components/ntp_snippets/content_suggestions_metrics.cc

Issue 2846233003: 📰 Record user actions on the NTP and Home sheet (Closed)
Patch Set: Address bauerb@'s comment Created 3 years, 7 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
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 5d2d4afe9af355040b420d72fb3d165b534e8ddd..c6345f2642f5bb0831781c1219f84686062edc1e 100644
--- a/components/ntp_snippets/content_suggestions_metrics.cc
+++ b/components/ntp_snippets/content_suggestions_metrics.cc
@@ -292,6 +292,8 @@ void OnSuggestionOpened(int global_position,
if (category.IsKnownCategory(KnownCategories::ARTICLES)) {
RecordContentSuggestionsUsage();
}
+
+ base::RecordAction(base::UserMetricsAction("Suggestions.Content.Opened"));
}
void OnSuggestionMenuOpened(int global_position,
@@ -366,5 +368,17 @@ void RecordRemoteSuggestionsProviderState(bool enabled) {
"NewTabPage.ContentSuggestions.Preferences.RemoteSuggestions", enabled);
}
+void RecordContentSuggestionDismissed() {
+ base::RecordAction(base::UserMetricsAction("Suggestions.Content.Dismissed"));
+}
+
+void RecordCategoryDismissed() {
+ base::RecordAction(base::UserMetricsAction("Suggestions.Category.Dismissed"));
+}
+
+void RecordFetchAction() {
+ base::RecordAction(base::UserMetricsAction("Suggestions.Category.Fetch"));
+}
+
} // namespace metrics
} // namespace ntp_snippets

Powered by Google App Engine
This is Rietveld 408576698