code: public void send(Event event) {
      HttpPost request = new HttpPost(MetricsUtils.GA_ENDPOINT_URL);
      request.setEntity(MetricsUtils.buildPostBody(event, analyticsId, random));
      client.execute(request, new FutureCallback<HttpResponse>() {
        @Override
        public void completed(HttpResponse result) {
          try {
            // Let BasicResponseHandler do the work of checking the status
            // code. The actual response body is irrelevant.
            RESPONSE_HANDLER.handleResponse(result);
          } catch (IOException e) {
            // For our purposes, this is exactly identical to a failure.
            failed(e);
          }
        }
  
        @Override
        public void failed(Exception ex) {
          // Can't really do anything but log the problem.
          LOGGER.warning("Problem sending request to server: " + ex);
        }
  
        @Override
        public void cancelled() {
          LOGGER.warning("Metrics-reporting HTTP request was cancelled.");
        }
      });
    }
docs: Translates an encapsulated event into a request to the Google Analytics API and asynchronously
  sends the resulting request. Note that errors will only be caught in the asynchronous execution
  thread and therefore will not result in an exception, unlike {@link MetricsSender}.