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

Unified Diff: ui/file_manager/file_manager/common/js/metrics.js

Issue 1035483004: Files.app: Switch analytics to use the chrome version, not the app version, for tracking. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Provide a known default version string. Created 5 years, 9 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/common/js/metrics.js
diff --git a/ui/file_manager/file_manager/common/js/metrics.js b/ui/file_manager/file_manager/common/js/metrics.js
index fa84d7e56d1b711808b45bbd26406574e5a16d06..7fcfc96f7145104c8bcecb9c26cfacb71b7431e5 100644
--- a/ui/file_manager/file_manager/common/js/metrics.js
+++ b/ui/file_manager/file_manager/common/js/metrics.js
@@ -50,7 +50,12 @@ metrics.getTracker = function() {
* @private
*/
metrics.createTracker_ = function() {
- metrics.analytics_ = analytics.getService('Files app');
+ var chromeVersion = /Chrome\/([0-9]*)\.[0-9.]*/.exec(navigator.userAgent);
+ if (chromeVersion && chromeVersion[1]) {
+ metrics.analytics_ = analytics.getService('Files app', chromeVersion[1]);
mtomasz 2015/03/25 00:46:16 optional: This holds milestone only. Shall we keep
+ } else {
+ metrics.analytics_ = analytics.getService('Files app', '0.0');
+ }
// Create a tracker, add a filter that only enables analytics when UMA is
// enabled.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698