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

Unified Diff: components/metrics/proto/translate_event.proto

Issue 2394643002: Add TranslateEventProto to UMA metrics (Closed)
Patch Set: One more bug fix. Created 4 years, 2 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 | « components/metrics/proto/chrome_user_metrics_extension.proto ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/proto/translate_event.proto
diff --git a/components/metrics/proto/translate_event.proto b/components/metrics/proto/translate_event.proto
new file mode 100644
index 0000000000000000000000000000000000000000..8dae1b0c01063fc26b7c52d330bfcd0a2b4da1d6
--- /dev/null
+++ b/components/metrics/proto/translate_event.proto
@@ -0,0 +1,134 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Stores information about translate UI, translate Ranekr and user interaction.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+option java_outer_classname = "TranslateEventProtos";
+option java_package = "org.chromium.components.metrics";
+
+package metrics;
+
+// Stores information about a single interaction between a user and
+// the Translate UI. Contains features used by Translate Ranker for
+// inference, information about the ranker model and its decision, as
+// well as user or automated feedback from the Translate UI.
+// Next tag: 14
+message TranslateEventProto {
+ // Language strings are two or three letter codes, with sometimes an extra
+ // suffix (for e.g. chinese zh-TW or zh-CN). See
+ // https://cs.chromium.org/chromium/src/components/translate/core/browser/translate_language_list.cc
+ // for a list of supported languages.
+ // Source language of the translation.
+ optional string source_language = 1;
+ // Target language of the translation.
+ optional string target_language = 2;
+
+ // The following counts are extracted from TranslatePrefs.
+ // The number of times the user accepted a translation for the
+ // source language.
+ optional int32 accept_count = 3;
+ // The number of times the user declined a translation for the
+ // source language.
+ optional int32 decline_count = 4;
+ // The number of times the user ignored a translation for the source
+ // language.
+ optional int32 ignore_count = 5;
+
+ // Language list from the language settings. These are languages the user
+ // explicitly set in the language settings.
+ repeated string language_list = 6;
+
+ // The version of the translate ranker model.
+ optional uint32 ranker_version = 7;
+
+ // Timestamp of when the Ranker was queried, in seconds.
+ // This value comes from Chromium's TimeTicks::Now(), which is an abstract
+ // time value that is guaranteed to always be increasing (regardless of
+ // Daylight Saving Time or any other changes to the system clock).
+ // These numbers are only comparable within a session. To sequence events
+ // across sessions, order by the |session_id| from the
+ // ChromeUserMetricsExtension message.
+ optional int64 ranker_request_timestamp_sec = 8;
+
+ // The decision of translate ranker whether we should show the UI or not.
+ enum RankerResponse {
+ SHOW = 0;
+ DONT_SHOW = 1;
+ NOT_QUERIED = 2;
+ }
+ optional RankerResponse ranker_response = 9;
+
+ // The action performed by the user in the translate UI.
+ enum EventType {
+ // The feedback event does not correspond to any of the enumerated
+ // cases.
+ UNKNOWN = 0;
+
+ // User actions.
+ // The user clicked 'Nope' in the UI.
+ USER_DECLINE = 1;
+ // The user clicked 'Translate' in the UI.
+ USER_ACCEPT = 2;
+ // The user explicitly closed the UI.
+ USER_DISMISS = 3;
+ // The user ignored the UI.
+ USER_IGNORE = 4;
+ // The user asked to never translate this source language.
+ USER_NEVER_TRANSLATE_LANGUAGE = 5;
+ // The user asked to never translate on this site.
+ USER_NEVER_TRANSLATE_SITE = 6;
+ // The user asked to always translate this source language.
+ USER_ALWAYS_TRANSLATE_LANGUAGE = 7;
+ // The user explicitly asked for a translation from the context menu.
+ USER_CONTEXT_MENU_TRANSLATE = 8;
+ // The user reverted the translation.
+ USER_REVERT = 9;
+
+ // Automated feedback.
+ // An automatic translation was triggered.
+ AUTOMATICALLY_TRANSLATED = 10;
+ // The translation was not offered because translate is disabled
+ // globally in the user preferences.
+ DISABLED_BY_PREF = 11;
+ // The translation was not offered because this language is
+ // blacklisted in the user config.
+ LANGUAGE_DISABLED_BY_USER_CONFIG = 12;
+ // The translation was not offered because this language or URL is
+ // blacklisted in the user config.
+ URL_DISABLED_BY_USER_CONFIG = 13;
+ // The translation was not offered because this language has been denied too
+ // many times.
+ LANGUAGE_DISABLED_BY_AUTO_BLACKLIST = 14;
+ // The translation was not offered because Ranker dismissed it.
+ DISABLED_BY_RANKER = 15;
+ // The translation was not offered because the source or target
+ // language is not supported.
+ UNSUPPORTED_LANGUAGE = 16;
+ // The translation was not offered because the URL is not
+ // supported (e.g. New Tab Page).
+ UNSUPPORTED_URL = 17;
+ }
+
+ // Event received from translate UI.
+ optional EventType event_type = 10;
+
+ // The timestamp for the event, in seconds.
+ // This value comes from Chromium's TimeTicks::Now(), which is an abstract
+ // time value that is guaranteed to always be increasing (regardless of
+ // Daylight Saving Time or any other changes to the system clock).
+ // These numbers are only comparable within a session. To sequence events
+ // across sessions, order by the |session_id| from the
+ // ChromeUserMetricsExtension message.
+ optional int64 event_timestamp_sec = 11;
+
+ // Modified source language, if the user changed it. If changed more than
+ // once, we only keep the last one.
+ optional string modified_source_language = 12;
+ // Modified target language, if the user changed it. If changed more than
+ // once, we only keep the last one.
+ optional string modified_target_language = 13;
+}
« no previous file with comments | « components/metrics/proto/chrome_user_metrics_extension.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698