diff options
author | mirandac@google.com <mirandac@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-01 20:23:04 +0000 |
---|---|---|
committer | mirandac@google.com <mirandac@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-01 20:23:04 +0000 |
commit | 25f3474cdeb137ab19ca9f5f03f5cb6a266e1387 (patch) | |
tree | 1212edb16e50cb8289ae00e4c077b0b58d26fff7 /chrome/browser/resources | |
parent | 0ddf338f531c117f6c47dec232a433fcd313d4db (diff) | |
download | chromium_src-25f3474cdeb137ab19ca9f5f03f5cb6a266e1387.zip chromium_src-25f3474cdeb137ab19ca9f5f03f5cb6a266e1387.tar.gz chromium_src-25f3474cdeb137ab19ca9f5f03f5cb6a266e1387.tar.bz2 |
Add UMA logging of clicked tip links.
BUG=48030
TEST=none
Review URL: http://codereview.chromium.org/2859038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r-- | chrome/browser/resources/new_new_tab.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js index fa16397..16549d2 100644 --- a/chrome/browser/resources/new_new_tab.js +++ b/chrome/browser/resources/new_new_tab.js @@ -937,3 +937,14 @@ function mostVisitedPages(data, firstRun) { showFirstRunNotification(); } } + +// Log clicked links from the tips section. +document.addEventListener('click', function(e) { + var tipLinks = document.querySelectorAll('#tip-line a'); + for (var i = 0, tipLink; tipLink = tipLinks[i]; i++) { + if (tipLink.contains(e.target)) { + chrome.send('metrics', ['NTPTip_' + tipLink.href]); + break; + } + } +}); |