Skip to content

Commit

Permalink
Add NewTabPage.TileType and .TileTypeClicked on Android
Browse files Browse the repository at this point in the history
There already are versions of these split by tile source, but the accumulated totals weren't there.

BUG=611341

Review-Url: https://codereview.chromium.org/2131133003
Cr-Commit-Position: refs/heads/master@{#405199}
  • Loading branch information
treib authored and Commit bot committed Jul 13, 2016
1 parent 40ebdf1 commit 7668db4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/ntp_tiles/most_visited_sites.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ void MostVisitedSites::RecordTileTypeMetrics(
for (size_t i = 0; i < tile_types.size(); ++i) {
int tile_type = tile_types[i];
++counts_per_type[tile_type];

UMA_HISTOGRAM_ENUMERATION("NewTabPage.TileType", tile_type, NUM_TILE_TYPES);

std::string histogram = base::StringPrintf(
"NewTabPage.TileType.%s",
GetSourceHistogramName(sources[i]).c_str());
Expand All @@ -260,6 +263,9 @@ void MostVisitedSites::RecordOpenedMostVisitedItem(int index,
"NewTabPage.MostVisited.%s", GetSourceHistogramName(source).c_str());
LogHistogramEvent(histogram, index, num_sites_);

UMA_HISTOGRAM_ENUMERATION(
"NewTabPage.TileTypeClicked", tile_type, NUM_TILE_TYPES);

histogram = base::StringPrintf("NewTabPage.TileTypeClicked.%s",
GetSourceHistogramName(source).c_str());
LogHistogramEvent(histogram, tile_type, NUM_TILE_TYPES);
Expand Down

0 comments on commit 7668db4

Please sign in to comment.