Class Analytics

java.lang.Object
org.cyclops.cyclopscore.tracking.Analytics

public class Analytics extends Object
An analytics service that uses the Google Measurement Protocol. This conforms to the Google Measurement Protocol policy: https://developers.google.com/analytics/devguides/collection/protocol/policy No data is collected which can be used to identify a player. This will be disabled when the Minecraft snooper is disabled or if this service is disabled in the config file.
  • Constructor Details

    • Analytics

      public Analytics()
  • Method Details

    • registerMod

      public static void registerMod(ModBase mod, String trackingId)
      Register a new mod to track. Make sure to call this before the mod init phase.
      Parameters:
      mod - The mod.
      trackingId - The Google Analytics tracking id to use.
    • getTrackingMods

      protected static List<org.apache.commons.lang3.tuple.Pair<ModBase,String>> getTrackingMods()
    • sendAll

      public static void sendAll()
      Send tracking info for all registered mods. This should and can only be called once.
    • createRequestURL

      protected static String createRequestURL(ModBase<?> mod, String trackingId) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException