+ EPApp app = null;
+ String version = "";
+ try {
+ app = getApp(request);
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger,
+ " Error retrieving Application to capture app name for analytics; Proceeding with empty app name");
+ }
+ if (app != null) {
+ String restEndPoint = app.getAppRestEndpoint();
+ if(restEndPoint.indexOf("/api")!=-1) {
+ version = restEndPoint.substring(restEndPoint.indexOf("/api")+4);
+ }
+ }
+ String END_POINT = "/storeAnalytics";
+ if(StringUtils.isNotBlank(version)) {
+ END_POINT = version + "/storeAnalytics";
+ }
+