diff options
-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; + } + } +}); |