All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.brsanthu.googleanalytics.GaUtils Maven / Gradle / Ivy

Go to download

This is Java API for Google Analytics (Measurement Protocol). More information about the protocol is available at https://developers.google.com/analytics/devguides/collection/protocol/v1/.

There is a newer version: 2.0.0
Show newest version
package com.brsanthu.googleanalytics;


public class GaUtils {
	public static boolean isNotEmpty(String value) {
		return !isEmpty(value);
	}

	public static boolean isEmpty(String value) {
    	return value == null || value.trim().length() == 0;
    }

	public static StringBuilder appendSystemProperty(StringBuilder sb, String property) {
		String value = System.getProperty(property);
		if (isNotEmpty(value)) {
			if (isNotEmpty(sb.toString())) {
				sb.append("/");
			}
			sb.append(value);
		}
		
		return sb;
	}
	
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy