<!--
Copyright 2020 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!--
This file is used to generate a comprehensive list of Translate histograms
along with a detailed description for each histogram.
For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md
Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
[email protected].
-->
<histogram-configuration>
<histograms>
<histogram name="Translate.ApplicationStart.AlwaysTranslateLanguage"
enum="LocaleCodeISO639" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The language codes of the languages in the user's always translate language
list. If the user has multiple languages in this list, then a separate entry
is recorded for each language.
This histogram is recorded once per profile initiation. Incognito profiles
are ignored.
</summary>
</histogram>
<histogram name="Translate.ApplicationStart.AlwaysTranslateLanguage.Count"
units="languages" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of languages in the user's always translate language list.
This histogram is recorded once per profile initiation. Incognito profiles
are ignored.
</summary>
</histogram>
<histogram name="Translate.ApplicationStart.NeverTranslateLanguage"
enum="LocaleCodeISO639" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The language code of the languages in the user's never translate language
list. If the user has multiple languages in this list, then a separate entry
is recorded for each language.
This histogram is recorded once per profile initiation. Incognito profiles
are ignored.
</summary>
</histogram>
<histogram name="Translate.ApplicationStart.NeverTranslateLanguage.Count"
units="languages" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of languages in the user's never translate language list.
This histogram is recorded once per profile initiation. Incognito profiles
are ignored.
</summary>
</histogram>
<histogram name="Translate.ApplicationStart.NeverTranslateSite.Count"
units="sites" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of sites in the user's never translate site list.
This histogram is recorded once per profile initiation. Incognito profiles
are ignored.
</summary>
</histogram>
<histogram name="Translate.CLD3.LanguageDetected" enum="LocaleCodeISO639"
expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Language of the input page detected by CLD3. This information is logged on
every page load.
</summary>
</histogram>
<histogram name="Translate.CLD3.LanguagePercentage" units="%"
expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Percentage of the bytes that are associated with the most popular language
on the input page. Only recorded if the detection returned a
"known" result.
</summary>
</histogram>
<histogram name="Translate.CLD3.TopLanguageEvaluationDuration" units="ms"
expires_after="2022-06-30">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The time to evaluate the CLD3 language detection model for the top language.
This information is logged on every request.
</summary>
</histogram>
<histogram name="Translate.CompactInfobar.Event" enum="TranslateCompactUIEvent"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>Various user actions performed in the translate infobar.</summary>
</histogram>
<histogram name="Translate.HrefHint.Status" enum="HrefTranslateStatus"
expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
For Google navigations, the hrefTranslate hint may trigger a translation
automatically. If the hint is present on a Google navigation, record whether
or not automatic translation happened. If automatic translation was already
going to happen, then we use the auto translate target language. Also record
if this caused the target language to be different than the hrefTranslate
target language.
</summary>
</histogram>
<histogram name="Translate.InfobarShown" enum="BooleanHit" expires_after="M85">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of times the translate infobar was shown in the old translate UI
on Android. Only true is recorded.
</summary>
</histogram>
<histogram name="Translate.LanguageDetection.ContentLength" units="characters"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of characters of page content used for language detection.
</summary>
</histogram>
<histogram name="Translate.LanguageDetection.LanguageVerification"
enum="TranslateLanguageVerification" expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Measures whether the provided HTML language (i.e. the page lang attribute if
it exists, otherwise the header Content-Language value) matches the language
determined by the model. Beyond directly matching or mismatching the HTML
language, the model can complement the HTML language. For example, suppose
the HTML language is 'zh' (general Chinese), a language code that the
Translate server does not support. In this case, the model can detect a
subcode like '-TW' or '-CN', resulting in language codes 'zh-TW' and
'zh-CN', which the Translate server supports. This is referred to as
"complementing a language subcode".
This histogram is recorded every time language detection is run. This
includes for each page load, and for sub frame detection.
</summary>
</histogram>
<histogram name="Translate.LanguageDetection.TFLiteModelEvaluationDuration"
units="ms" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the time taken for the TFLite language detection model to determine
page language. Unlike Translate.LanguageDeterminedDuration, this metric does
not record the duration for CDL3 language detection when the TFLite model is
unavailable.
</summary>
</histogram>
<histogram name="Translate.LanguageDetectionTiming"
enum="TranslateLanguageDetectionTiming" expires_after="M85">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
For each page load, records whether language detection occurs on time or
gets deferred. If deferred language detection later completes, this is also
recorded. This allows measuring the UX impact of using a non-static CLD data
source.
</summary>
</histogram>
<histogram name="Translate.LanguageDeterminedDuration" units="ms"
expires_after="2022-06-30">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the time from when a navigation finishes to when its page language
is determined. This includes the time to load the frame(s), capturing the
text content of the page, and running language classification on that
content.
</summary>
</histogram>
<histogram name="Translate.MenuTranslation.IsAvailable" enum="BooleanAvailable"
expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the availability of manual translate from the context (Desktop) menu
and app (Mobile) menu. Emitted when the menu is shown.
</summary>
</histogram>
<histogram name="Translate.MenuTranslation.UnavailableReasons"
enum="MenuTranslationUnavailableReason" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
If manual translate is not available on the context (Desktop) or app
(Mobile) menu for the current page, logs ALL the reasons why. Emitted when
the menu is shown. More than one bucket may be logged per menu open. This
allows us to investigate the primary reasons the user isn't seeing the menu
item and make the manual translate UI more visible to users.
</summary>
</histogram>
<histogram name="Translate.PageLoad.FinalSourceLanguage"
enum="LocaleCodeISO639" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the hashcode of the source language at the end of the page load.
This may differ from the initial source language determined by Chrome,
because the user can manually change the source language. This value is
logged once the page load is completed or the first time Chrome is
backgrounded during the course of the page load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.FinalState" enum="TranslateState"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The state of Translate at the end of a page load. The state includes whether
the page is translated, and what translate is shown (no UI, omnibox icon
only, and full UI shown). This value is logged once the page load is
completed or the first time Chrome is backgrounded during the course of the
page load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.FinalTargetLanguage"
enum="LocaleCodeISO639" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the hashcode of the target language at the end of the page load.
This may differ from the initial target language determined by Chrome,
because the user can manually change the target language. This value is
logged once the page load is completed or the first time Chrome is
backgrounded during the course of the page load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.HrefHint.TriggerDecision"
enum="TranslateTriggerDecision" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the highest priority reason for the initial state of Translate for the
page load. Only logs for navigations from Google with an href translate
attribute. This value is logged at the end of the page load or the first
time Chrome is backgrounded during the page load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.InitialSourceLanguage"
enum="LocaleCodeISO639" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the hashcode of the source language at the beginning of the page
load. The initial source language is automatically determined by Chrome.
This value is logged once the page load is completed or the first time
Chrome is backgrounded during the course of the page load, whichever comes
first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.InitialState" enum="TranslateState"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The state of Translate at the start of a page load. The state includes
whether the page is translated, and what translate is shown (no UI, omnibox
icon only, and full UI shown). This value is logged once the page load is
completed or the first time Chrome is backgrounded during the course of the
page load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.InitialTargetLanguage"
enum="LocaleCodeISO639" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the hashcode of the target language at the beginning of the page
load. The initial target language is automatically determined by Chrome.
This value is logged once the page load is completed or the first time
Chrome is backgrounded during the course of the page load, whichever comes
first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.InitialTargetLanguage.Origin"
enum="TranslateTargetLanguageOrigin" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the origin of the target language at the beginning of the page load.
This is the reason why Chrome decided to use the initial target language.
This value is logged once the page load is completed or the first time
Chrome is backgrounded during the course of the page load, whichever comes
first.
</summary>
</histogram>
<histogram
name="Translate.PageLoad.IsInitialSourceLanguageInUsersContentLanguages"
enum="Boolean" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Whether or not the initial source language of this page load is in the
user's never translate language list. By default the UI language, languages
the user has translated to, and languages added to the content languages are
on the never tranlsate list. However, users can add or remove languages
manually as well.
This value is logged once the page load is completed or the first time
Chrome is backgrounded during the course of the page load, whichever comes
first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.NumReversions" units="reversions"
expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of translations that are reverted over the course of a page load.
This value is logged once the page load is completed or the first time
Chrome is backgrounded during the course of the page load, whichever comes
first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.NumTargetLanguageChanges"
units="target language changes" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of times the user changed the target language over the course of
the page load. This value is logged once the page load is completed or the
first time Chrome is backgrounded during the course of the page load,
whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.NumTranslations" units="translations"
expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of translations performed over the course of a page load. This
value is logged once the page load is completed or the first time Chrome is
backgrounded during the course of the page load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.Ranker.Decision"
enum="TranslateRankerDecision" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the decision (show UI, don't show UI, or not queried) of the Translate
Ranker for a page load. This value is logged once the page load is completed
or the first time that Chrome is backgrounded during the course of the page
load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.Ranker.Timer.ShouldOfferTranslation"
units="ms" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the time it takes for the Translate Ranker to calculate whether or not
the Translate UI should be shown. This value is only logged on pages loads
where the Translate Ranker is queried. On these page loads, the value is
logged once the page load is completed or the first time that Chrome is
backgrounded during the course of the page load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.Ranker.Version" units="version"
expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the version of the Translate Ranker used for a page load. This value is
logged once the page load is completed or the first time that Chrome is
backgrounded during the course of the page load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PageLoad.TriggerDecision"
enum="TranslateTriggerDecision" expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the highest priority reason for the initial state of Translate for the
page load. This value is logged at the end of the page load or the first
time Chrome is backgrounded during the page load, whichever comes first.
</summary>
</histogram>
<histogram name="Translate.PartialTranslateBubbleUiEvent"
enum="PartialTranslateBubbleUiEvent" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>Tracks UI events related to the Partial Translate bubble.</summary>
</histogram>
<histogram name="Translate.PartialTranslation.HttpResponseCode"
enum="HttpResponseCode" expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
For each HTTP response for the Partial Translation request to Contextual
Search Plugin, reports the associated HTTP code.
</summary>
</histogram>
<histogram name="Translate.PartialTranslation.ResponseTime" units="ms"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the time from a Partial Translate being requested to the corresponding
Partial Translate response being received. This is recorded when a Partial
Translation is completed.
</summary>
</histogram>
<histogram name="Translate.PartialTranslation.Selection.CharacterCount"
units="characters" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the length in characters of a Partial Translate text selection before
truncation. This is recorded before a Partial Translation is started.
</summary>
</histogram>
<histogram name="Translate.PartialTranslation.SourceLanguage"
enum="LocaleCodeISO639" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the source language used for a Partial Translate request. This is
recorded when a Partial Translation is started.
</summary>
</histogram>
<histogram name="Translate.PartialTranslation.TargetLanguage"
enum="LocaleCodeISO639" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the target language used for a Partial Translate request. This is
recorded when a Partial Translation is started.
</summary>
</histogram>
<histogram name="Translate.PartialTranslation.Translated.CharacterCount"
units="characters" expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the length in characters of the translated text from a Partial
Translation. This is recorded when a Partial Translation is completed and
only when it is successful. Nothing is recorded on error.
</summary>
</histogram>
<histogram name="Translate.PartialTranslation.TranslationStatus"
enum="PartialTranslateTranslationStatus" expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Logs the completion status of a Partial Translation. This is recorded when a
Partial Translation is completed.
</summary>
</histogram>
<histogram name="Translate.Ranker.Model.Status2" enum="RankerModelStatus"
expires_after="2024-12-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Tracks the outcome of attempts to download a Translate Ranker Model. Only
recorded for profiles where Translate is available (not recorded in System
profiles nor Ash non-user profiles).
</summary>
</histogram>
<histogram name="Translate.Translation.LanguageDetection.ContentLength"
units="characters" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The number of characters of page content extracted at language detection
time, recorded when a translation successfully finishes. This can be used as
a rough estimate for the amount of content translated.
</summary>
</histogram>
<histogram name="Translate.Translation.ShowErrorUI" enum="TranslateError"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Chrome Translate shows an error UI (infobar or bubble) when an error happens
on translation with a UI message specific to the error type. This metric
records how often each error message is shown.
This is not recorded every translation, it is only recorded when a
translation results in an error and the error UI is shown.
</summary>
</histogram>
<histogram name="Translate.Translation.SourceLanguage" enum="LocaleCodeISO639"
expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the source language used for a translation. This is the language
being translated from.
This is recorded when a translation (both manual and automatic) is started.
</summary>
</histogram>
<histogram name="Translate.Translation.Status" enum="TranslationStatus"
expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the final status of a translation. We count a translation as
successful if the user keeps the translation until the end of the page load.
Otherwise we record what followed the translation (for example the user
reverted the translation, or the user requested a different translation).
For each translation one sample is recorded once the status of the
translation is determined. This includes when the page load is finished, the
user reverts the translation, a new translation is requested, or the
translation fails. Note that we consider the user backgrounding Chrome as
the page load finishing because we can lose any stored metrics if the user
kills Chrome while it is backgrounded.
</summary>
</histogram>
<histogram name="Translate.Translation.TargetLanguage" enum="LocaleCodeISO639"
expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the target language used for a translation. This is the language
being translated to.
This is recorded when a translation (both manual and automatic) is started.
</summary>
</histogram>
<histogram name="Translate.Translation.TargetLanguage.Origin"
enum="TranslateTargetLanguageOrigin" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the origin of the target language used for a translation.
This is recorded when a translation (both manual and automatic) is started.
</summary>
</histogram>
<histogram name="Translate.Translation.TimeToBeReady" units="ms"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the time from injecting the translation scripts to being ready to
perform translation.
This is recorded when a translation (both manual and automatic) is started.
</summary>
</histogram>
<histogram name="Translate.Translation.TimeToLoad" units="ms"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the time from injecting the translation scripts to finish loading
all dependent libraries.
This is recorded when a translation (both manual and automatic) is started.
</summary>
</histogram>
<histogram name="Translate.Translation.TimeToTranslate" units="ms"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the time from when the translation script begins translating to when
it finishes.
This is recorded when a translation (both manual and automatic) is started.
</summary>
</histogram>
<histogram name="Translate.Translation.Type" enum="TranslationType"
expires_after="2025-02-09">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the type of translation being performed, either manual or automatic.
We additionally breakdown automatic translations by the reason why an
automatic translation was performed.
This is recorded when a translation (both manual and automatic) is started.
</summary>
</histogram>
<histogram name="Translate.UiInteraction.Event" enum="TranslateUIInteraction"
expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records the UI interaction that the user performed. The set of possible
actions are independent of the exact UI and platform, and capture the high
level action performed.
This is recorded every time the user interacts with the Translate UI on all
platforms.
</summary>
</histogram>
<histogram name="TranslateModelService.LanguageDetectionModel.WasLoaded"
enum="BooleanLoaded" expires_after="2025-02-10">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Records whether the language detection model file provided by the
OptimizationGuide was valid and was successfully loaded by the
TranslateModelService. Recorded once per model update by the
OptimizationGuide.
</summary>
</histogram>
</histograms>
</histogram-configuration>