Package org.cyclops.cyclopscore.tracking
Class Analytics
java.lang.Object
org.cyclops.cyclopscore.tracking.Analytics
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
createRequestURL
(ModBase<?> mod, String trackingId) static void
registerMod
(ModBase mod, String trackingId) Register a new mod to track.static void
sendAll()
Send tracking info for all registered mods.
-
Constructor Details
-
Analytics
public Analytics()
-
-
Method Details
-
registerMod
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
-
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
-