Chromium Code Reviews| 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 95a1381cc08ef963bcdad3cefe72076adce86337..ba6f2b30bc0b7b59ebafb038d463c134ad9439b0 100644 |
| --- a/components/ntp_snippets/content_suggestions_metrics.cc |
| +++ b/components/ntp_snippets/content_suggestions_metrics.cc |
| @@ -61,6 +61,8 @@ const char kHistogramCategoryDismissed[] = |
| "NewTabPage.ContentSuggestions.CategoryDismissed"; |
| const char kHistogramContentSuggestionsTimeSinceLastBackgroundFetch[] = |
| "NewTabPage.ContentSuggestions.TimeSinceLastBackgroundFetch"; |
| +const char kHistogramContentSuggestionsTimeSinceSuggestionFetched[] = |
|
Marc Treib
2017/02/21 09:14:09
optional nit: You could remove "ContentSuggestions
markusheintz_
2017/02/21 11:31:50
Done.
|
| + "NewTabPage.ContentSuggestions.TimeSinceSuggestionFetched"; |
| const char kPerCategoryHistogramFormat[] = "%s.%s"; |
| @@ -235,6 +237,13 @@ void OnSuggestionShown(int global_position, |
| LogCategoryHistogramScore(kHistogramShownScore, category, score); |
| + // Records the time since the fetch time of the displayed snippet. |
| + UMA_HISTOGRAM_CUSTOM_TIMES( |
| + kHistogramContentSuggestionsTimeSinceSuggestionFetched, |
| + base::Time::Now() - fetch_date, base::TimeDelta::FromSeconds(1), |
| + base::TimeDelta::FromDays(7), |
| + /*bucket_count=*/100); |
|
Marc Treib
2017/02/21 09:14:09
Should we record this only for ARTICLES?
If not, s
markusheintz_
2017/02/21 11:31:50
Done.
No the fetch date for non Article suggestio
|
| + |
| // TODO(markusheintz): Discuss whether the code below should be move into a |
| // separate method called OnSuggestionsListShown. |
| // When the first of the articles suggestions is shown, then we count this as |