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

Unified Diff: components/ntp_snippets/content_suggestions_metrics.cc

Issue 2846233003: 📰 Record user actions on the NTP and Home sheet (Closed)
Patch Set: Ready for actual review 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..bd6b1e918dce0e22693c44d8e26f764e90e3b9e8 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.Action.Fetch"));
Marc Treib 2017/05/05 16:05:39 I might have missed some discussion about naming,
dgn 2017/05/08 12:40:50 Action is for the things that happen when tapping
Marc Treib 2017/05/08 12:46:20 That seems more consistent to me, but I'll leave i
+}
+
} // namespace metrics
} // namespace ntp_snippets

Powered by Google App Engine
This is Rietveld 408576698