X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCache.java;h=fc9dddab4dd49cbaeebffb9f33dfd1738c114d53;hb=9476b459d78a974bdb525600ada55d9f3ebde8f1;hp=75166dae445cb7eecffc96c9d47d062f42d6efe7;hpb=dcfd3a7cad3edcd703caec55ef687c5431ef3bd1;p=jalview.git diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 75166da..fc9ddda 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -978,8 +978,21 @@ public class Cache + " Desktop"; String version = Cache.getProperty("VERSION") + "_" + Cache.getDefault("BUILD_DATE", "unknown"); - String path = "/" - + String.join("/", appName, version, APPLICATION_STARTED); + String path; + /* we don't want to encode ':' as "%3A" for backward compatibility with the UA setup + try + { + path = "/" + String.join("/", URLEncoder.encode(appName, "UTF-8"), + URLEncoder.encode(version, "UTF-8"), + URLEncoder.encode(APPLICATION_STARTED, "UTF-8")); + } catch (UnsupportedEncodingException e) + { + */ + path = ("/" + String.join("/", appName, version, APPLICATION_STARTED)) + .replace(' ', '+'); + /* + } + */ GoogleAnalytics4 ga4 = GoogleAnalytics4.getInstance(); // This will add a page_view similar to the old UA analytics. @@ -990,7 +1003,7 @@ public class Cache // This will send a new "application_launch" event with parameters // including the old-style "path", the channel name and version - ga4.sendAnalytics("application_launch", "page_location", path); + ga4.sendAnalytics("application_launch", true, "page_location", path); } else {