JAL-4001 Trying to see extra information in GA dashboard
authorBen Soares <b.soares@dundee.ac.uk>
Wed, 14 Jun 2023 22:21:02 +0000 (23:21 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Wed, 14 Jun 2023 22:21:02 +0000 (23:21 +0100)
src/jalview/analytics/GoogleAnalytics4.java

index 031cfc2..d247662 100644 (file)
@@ -37,6 +37,8 @@ public class GoogleAnalytics4
 
   private static final String BASE_URL = "https://www.google-analytics.com/mp/collect";
 
+  private static final String DESKTOP_EVENT = "desktop_event";
+
   private List<Map.Entry<String, String>> queryStringValues;
 
   private List<Map.Entry<String, Object>> jsonObject;
@@ -123,6 +125,8 @@ public class GoogleAnalytics4
       return;
     }
     Map<String, String> params = new HashMap<>();
+    params.put("event_category", DESKTOP_EVENT);
+    params.put("event_label", eventName);
 
     // add these to all events from this application instance
     if (sendDefaultParams)