diff --git a/src/main/java/com/brsanthu/googleanalytics/internal/GoogleAnalyticsImpl.java b/src/main/java/com/brsanthu/googleanalytics/internal/GoogleAnalyticsImpl.java index 2edc383..2d4fe43 100644 --- a/src/main/java/com/brsanthu/googleanalytics/internal/GoogleAnalyticsImpl.java +++ b/src/main/java/com/brsanthu/googleanalytics/internal/GoogleAnalyticsImpl.java @@ -291,11 +291,11 @@ protected void processCustomDimensionParameters(GoogleAnalyticsRequest reques */ protected void processCustomMetricParameters(GoogleAnalyticsRequest request, HttpRequest req) { Map customMetricParms = new HashMap<>(); - for (String defaultCustomMetricKey : defaultRequest.custommMetrics().keySet()) { - customMetricParms.put(defaultCustomMetricKey, defaultRequest.custommMetrics().get(defaultCustomMetricKey)); + for (String defaultCustomMetricKey : defaultRequest.customMetrics().keySet()) { + customMetricParms.put(defaultCustomMetricKey, defaultRequest.customMetrics().get(defaultCustomMetricKey)); } - Map requestCustomMetrics = request.custommMetrics(); + Map requestCustomMetrics = request.customMetrics(); for (String requestCustomDimKey : requestCustomMetrics.keySet()) { customMetricParms.put(requestCustomDimKey, requestCustomMetrics.get(requestCustomDimKey)); } diff --git a/src/main/java/com/brsanthu/googleanalytics/request/GoogleAnalyticsRequest.java b/src/main/java/com/brsanthu/googleanalytics/request/GoogleAnalyticsRequest.java index 62e6869..88adb63 100644 --- a/src/main/java/com/brsanthu/googleanalytics/request/GoogleAnalyticsRequest.java +++ b/src/main/java/com/brsanthu/googleanalytics/request/GoogleAnalyticsRequest.java @@ -306,10 +306,20 @@ public Map customDimensions() { return customDimensions; } + /** + * This method name has typo hence has been deprecated. + * + * @deprecated please use {@link #customMetrics} + */ + @Deprecated public Map custommMetrics() { return customMetrics; } + public Map customMetrics() { + return customMetrics; + } + @Override public String toString() { StringBuilder builder = new StringBuilder();