--- /dev/null
+package jalview.analytics;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+public class GoogleAnalytics4 {
+ private static final String JALVIEW_ID = "Jalview Desktop";
+ private static final String SESSION_ID = new Random().toString();
+ private static final String MEASUREMENT_ID = "G-6TMPHMXEQ0";
+ private static final String BASE_URL = "https://www.google-analytics.com/mp/collect";
+
+ private List<Map.Entry<String, String>> queryStringValues;
+ private List<Map.Entry<String, Object>> jsonValues;
+ private List<Map.Entry<String, String>> cookies;
+
+ private void addToJson(String key, List<String> values) {
+ }
+
+ private void addToJson(String key, String value) {
+ }
+
+ private void addToJson(String key, int value) {
+ }
+
+ private void addToJson(String key, boolean value) {
+ }
+
+ private void addToJson(String key, Object[] array) {
+ }
+
+ private void addQueryStringValue(String key, String value) {
+ }
+
+ private void reset() {
+ jsonValues = new ArrayList<>();
+ queryStringValues = new ArrayList<>();
+ cookies = new ArrayList<>();
+ }
+
+ private String buildJson() {
+ StringBuilder sb = new StringBuilder();
+ int indent = 0;
+ sb.append("{");
+ indent++;
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ private void addJsonObject(StringBuilder sb, int indent, String key, Object value) {
+ indent(sb, indent);
+ sb.append('"').append(key).append('"');
+ sb.append(": ");
+ if (List.class.equals(value.getClass())) {
+ sb.append('\n');
+ }
+ addJsonValue(sb, indent, value);
+ sb.append(",\n");
+ }
+
+ private void addJsonValue(StringBuilder sb, int indent, Object value) {
+ if (value == null) {
+ return;
+ }
+ Class c = value.getClass();
+ if (String.class.equals(c)) {
+ } else if (Integer.class.equals(c)) {
+ } else if (Boolean.class.equals(c)) {
+ }
+ sb.append(value);
+ }
+
+ private void indent(StringBuilder sb, int indent) {
+ sb.append(" ".repeat(indent));
+ }
+}