private void processCustomMetricParameters(@SuppressWarnings("rawtypes") GoogleAnalyticsRequest request, List<NameValuePair> postParms) {
    Map<String, String> customMetricParms = new HashMap<String, String>();
    for (String defaultCustomMetricKey : defaultRequest.custommMetrics().keySet()) {
      customMetricParms.put(defaultCustomMetricKey, defaultRequest.custommMetrics().get(defaultCustomMetricKey));
    }

    @SuppressWarnings("unchecked")
    Map<String, String> requestCustomMetrics = request.custommMetrics();
    for (String requestCustomDimKey : requestCustomMetrics.keySet()) {
      customMetricParms.put(requestCustomDimKey, requestCustomMetrics.get(requestCustomDimKey));
    }

    for (String key : customMetricParms.keySet()) {
      postParms.add(new BasicNameValuePair(key, customMetricParms.get(key)));
    }
  }
private void processCustomMetricParameters ( @ SuppressWarnings ( "rawtypes" ) GoogleAnalyticsRequest request , List < NameValuePair > postParms ) { Map < String , String > customMetricParms = new HashMap < String , String > ( ) ; for ( String defaultCustomMetricKey : defaultRequest . custommMetrics ( ) . keySet ( ) ) { customMetricParms . put ( defaultCustomMetricKey , defaultRequest . custommMetrics ( ) . get ( defaultCustomMetricKey ) ) ; } @ SuppressWarnings ( "unchecked" ) Map < String , String > requestCustomMetrics = request . custommMetrics ( ) ; for ( String requestCustomDimKey : requestCustomMetrics . keySet ( ) ) { customMetricParms . put ( requestCustomDimKey , requestCustomMetrics . get ( requestCustomDimKey ) ) ; } for ( String key : customMetricParms . keySet ( ) ) { postParms . add ( new BasicNameValuePair ( key , customMetricParms . get ( key ) ) ) ; } }
Processes the custom metrics and adds the values to list of parameters, which would be posted to GA.

@param request
@param postParms