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

Unified Diff: chrome/browser/resources/local_ntp/most_visited_util.js

Issue 83943002: Adding UMA metric to record the type of suggestion displayed on the NTP's Most Visited section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Answered Mathieu's comments. Created 7 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 | chrome/browser/ui/webui/ntp/ntp_user_data_logger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/local_ntp/most_visited_util.js
diff --git a/chrome/browser/resources/local_ntp/most_visited_util.js b/chrome/browser/resources/local_ntp/most_visited_util.js
index 8a4ea9b3bba9d2e2fb8e84401b207e80ccd42434..63436a4d625a3af57b0342bcfe5f7b819f0d92e5 100644
--- a/chrome/browser/resources/local_ntp/most_visited_util.js
+++ b/chrome/browser/resources/local_ntp/most_visited_util.js
@@ -29,7 +29,9 @@ var NTP_LOGGING_EVENT_TYPE = {
NTP_FALLBACK_THUMBNAIL_REQUESTED: 3,
// The primary thumbnail image failed to load and caused us to use the
// secondary thumbnail as a fallback.
- NTP_FALLBACK_THUMBNAIL_USED: 4
+ NTP_FALLBACK_THUMBNAIL_USED: 4,
+ // The suggestion is coming from the server.
+ NTP_SERVER_SIDE_SUGGESTION: 5
};
@@ -155,7 +157,7 @@ function fillMostVisited(location, fill) {
return;
var data = {};
if (params.url) {
- // Means that we get suggestion data from the server. Create data object.
+ // Means that the suggestion data comes from the server. Create data object.
data.url = params.url;
data.thumbnailUrl = params.tu || '';
data.thumbnailUrl2 = params.tu2 || '';
@@ -163,6 +165,9 @@ function fillMostVisited(location, fill) {
data.direction = params.di || '';
data.domain = params.dom || '';
data.ping = params.ping || '';
+ // Log the fact that suggestion was obtained from the server.
+ var ntpApiHandle = chrome.embeddedSearch.newTabPage;
+ ntpApiHandle.logEvent(NTP_LOGGING_EVENT_TYPE.NTP_SERVER_SIDE_SUGGESTION);
} else {
var apiHandle = chrome.embeddedSearch.searchBox;
data = apiHandle.getMostVisitedItemData(params.rid);
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/ntp_user_data_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698