diff --git a/java/res/values/strings-production.xml b/java/res/values/strings-production.xml
new file mode 100644
index 0000000000000000000000000000000000000000..8064b99498930375a5afe55cd4f602ce2d1df2b3
--- /dev/null
+++ b/java/res/values/strings-production.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources>
+    <!-- Description for option to enable sending usage statistics -->
+    <string name="enable_metrics_logging_summary" translatable="false"></string>
+</resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 2ad7ce592575764e52a4929f76c179ba7cf0ab61..3f5980dfdfa007630328837d5a8d2b624f4212cf 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -87,6 +87,9 @@
     <!-- Option name for enabling the use by the keyboards of sent/received messages, e-mail and typing history to improve suggestion accuracy [CHAR LIMIT=25] -->
     <string name="use_personalized_dicts">Personalized suggestions</string>
 
+    <!-- Option to enable sending usage statistics -->
+    <string name="enable_metrics_logging">"Improve <xliff:g id="APPLICATION_NAME" example="Android Keyboard">%s</xliff:g>"</string>
+
     <!-- Option name for enabling or disabling the double-space period feature that lets double tap on spacebar insert a period followed by a space [CHAR LIMIT=30] -->
     <string name="use_double_space_period">Double-space period</string>
     <!-- Description for option enabling or disabling the double-space period feature that lets double tap on spacebar insert a period followed by a space [CHAR LIMIT=65] -->
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index a629862280d0909aa6a2c30ed89967dd3d9028e8..0e9c16190da3cc857a3cefc61c8abe9a0a7649c3 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -95,6 +95,12 @@
             android:summary="@string/use_personalized_dicts_summary"
             android:persistent="true"
             android:defaultValue="true" />
+        <!-- title will be set programmatically to embed application name -->
+        <CheckBoxPreference
+            android:key="pref_enable_metrics_logging"
+            android:summary="@string/enable_metrics_logging_summary"
+            android:persistent="true"
+            android:defaultValue="true" />
     </PreferenceCategory>
     <PreferenceCategory
         android:title="@string/gesture_typing_category"
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
index af46aad96f0dbca074e8cce79af2062fde1b3d97..5eb0377c79b14a5a7578650dc671a75075174d3f 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
@@ -41,6 +41,7 @@ import com.android.inputmethod.keyboard.KeyboardTheme;
 import com.android.inputmethod.latin.AudioAndHapticFeedbackManager;
 import com.android.inputmethod.latin.R;
 import com.android.inputmethod.latin.SubtypeSwitcher;
+import com.android.inputmethod.latin.define.ProductionFlag;
 import com.android.inputmethod.latin.setup.LauncherIconVisibilityManager;
 import com.android.inputmethod.latin.userdictionary.UserDictionaryList;
 import com.android.inputmethod.latin.userdictionary.UserDictionarySettings;
@@ -212,6 +213,20 @@ public final class SettingsFragment extends InputMethodSettingsFragment
             textCorrectionGroup.removePreference(dictionaryLink);
         }
 
+        if (ProductionFlag.IS_METRICS_LOGGING_SUPPORTED) {
+            final Preference enableMetricsLogging =
+                    findPreference(Settings.PREF_ENABLE_METRICS_LOGGING);
+            if (enableMetricsLogging != null) {
+                final int applicationLabelRes = context.getApplicationInfo().labelRes;
+                final String applicationName = res.getString(applicationLabelRes);
+                final String enableMetricsLoggingTitle = res.getString(
+                        R.string.enable_metrics_logging, applicationName);
+                enableMetricsLogging.setTitle(enableMetricsLoggingTitle);
+            }
+        } else {
+            removePreference(Settings.PREF_ENABLE_METRICS_LOGGING, textCorrectionGroup);
+        }
+
         final Preference editPersonalDictionary =
                 findPreference(Settings.PREF_EDIT_PERSONAL_DICTIONARY);
         final Intent editPersonalDictionaryIntent = editPersonalDictionary.getIntent();