JAL-4001 remove headless code from analytics
[jalview.git] / src / jalview / analytics / Plausible.java
index 0c085d0..1c9f254 100644 (file)
@@ -22,7 +22,6 @@ import java.util.Map;
 
 import jalview.bin.Cache;
 import jalview.bin.Console;
-import jalview.bin.Jalview;
 import jalview.util.ChannelProperties;
 import jalview.util.HttpUtils;
 
@@ -37,7 +36,7 @@ public class Plausible
 
   private static final String CONFIG_API_BASE_URL = "https://www.jalview.org/config/analytics/url";
 
-  private static final String DEFAULT_API_BASE_URL = "https://DEFAULT.plausible.io/api/event";
+  private static final String DEFAULT_API_BASE_URL = "https://plausible.io/api/event";
 
   private static final String API_BASE_URL;
 
@@ -85,6 +84,9 @@ public class Plausible
             System.getProperty("os.arch") + " "
                     + System.getProperty("os.name") + " "
                     + System.getProperty("os.version"));
+    defaultProps.put("os", System.getProperty("os.name"));
+    defaultProps.put("os_version", System.getProperty("os.version"));
+    defaultProps.put("os_arch", System.getProperty("os.arch"));
     String installation = Cache.applicationProperties
             .getProperty("INSTALLATION");
     if (installation != null)
@@ -143,10 +145,6 @@ public class Plausible
     if (sendDefaultProps)
     {
       props.putAll(defaultProps);
-      if (Jalview.isHeadlessMode())
-      {
-        props.put("headless", "true");
-      }
     }
 
     // add (and overwrite with) the passed in props