diff --git a/src-bind/com/android/contactsbind/analytics/AnalyticsUtil.java b/src-bind/com/android/contactsbind/analytics/AnalyticsUtil.java
index e48e8f2..53b59eb 100644
--- a/src-bind/com/android/contactsbind/analytics/AnalyticsUtil.java
+++ b/src-bind/com/android/contactsbind/analytics/AnalyticsUtil.java
@@ -25,27 +25,4 @@
      * Initialize this class and setup automatic activity tracking.
      */
     public static void initialize(Application application) { }
-
-    /**
-     * Log a screen view for {@param fragment}.
-     */
-    public static void sendScreenView(Fragment fragment) {}
-
-    public static void sendScreenView(Fragment fragment, Activity activity) {}
-
-    public static void sendScreenView(Fragment fragment, Activity activity, String tag) {}
-
-    public static void sendScreenView(String fragmentName, Activity activity, String tag) {}
-
-    /**
-     * Logs a event to the analytics server.
-     *
-     * @param application The application the tracker is stored in.
-     * @param category The category for the event.
-     * @param action The event action.
-     * @param label The event label.
-     * @param value The value associated with the event.
-     */
-    public static void sendEvent(Application application, String category, String action,
-            String label, long value) { }
 }
\ No newline at end of file
diff --git a/src/com/android/contacts/common/list/PhoneNumberPickerFragment.java b/src/com/android/contacts/common/list/PhoneNumberPickerFragment.java
index 3b7ed6b..bbbd794 100644
--- a/src/com/android/contacts/common/list/PhoneNumberPickerFragment.java
+++ b/src/com/android/contacts/common/list/PhoneNumberPickerFragment.java
@@ -29,10 +29,6 @@
 
 import com.android.contacts.common.R;
 import com.android.contacts.common.list.ShortcutIntentBuilder.OnShortcutIntentCreatedListener;
-import com.android.contactsbind.analytics.AnalyticsUtil;
-
-import org.json.JSONException;
-import org.json.JSONObject;
 
 /**
  * Fragment containing a phone number list for picking.
@@ -169,12 +165,6 @@
                         + " adapter is ready. Ignoring");
             }
         }
-
-        // Get the lookup key and track any analytics
-        final String lookupKey = getLookupKey(position);
-        if (!TextUtils.isEmpty(lookupKey)) {
-            maybeTrackAnalytics(lookupKey);
-        }
     }
 
     protected void cacheContactInfo(int position) {
@@ -304,42 +294,4 @@
     protected int getCallInitiationType(boolean isRemoteDirectory) {
         return OnPhoneNumberPickerActionListener.CALL_INITIATION_UNKNOWN;
     }
-
-    /**
-     * Where a lookup key contains analytic event information, logs the associated analytics event.
-     *
-     * @param lookupKey The lookup key JSON object.
-     */
-    private void maybeTrackAnalytics(String lookupKey) {
-        try {
-            JSONObject json = new JSONObject(lookupKey);
-
-            String analyticsCategory = json.getString(
-                    PhoneNumberListAdapter.PhoneQuery.ANALYTICS_CATEGORY);
-            String analyticsAction = json.getString(
-                    PhoneNumberListAdapter.PhoneQuery.ANALYTICS_ACTION);
-            String analyticsValue = json.getString(
-                    PhoneNumberListAdapter.PhoneQuery.ANALYTICS_VALUE);
-
-            if (TextUtils.isEmpty(analyticsCategory) || TextUtils.isEmpty(analyticsAction) ||
-                    TextUtils.isEmpty(analyticsValue)) {
-                return;
-            }
-
-            // Assume that the analytic value being tracked could be a float value, but just cast
-            // to a long so that the analytic server can handle it.
-            long value;
-            try {
-                float floatValue = Float.parseFloat(analyticsValue);
-                value = (long) floatValue;
-            } catch (NumberFormatException nfe) {
-                return;
-            }
-
-            AnalyticsUtil.sendEvent(getActivity().getApplication(), analyticsCategory,
-                    analyticsAction, "" /* label */, value);
-        } catch (JSONException e) {
-            // Not an error; just a lookup key that doesn't have the right information.
-        }
-    }
 }
