Google Analytics Wrapper for collecting anonymous statistics from the Unity Asset Store plugin users.
-
Register Google Analytics tracking ID: https://support.google.com/analytics/answer/1008080?hl=en
-
Add PublisherAnalytics.cs to your plugin project. Make sure it's under
Editor
folder. -
Initialize
PublisherAnalytics
instance on editor launch:using UnityEditor; using SpaceMadness; [InitializeOnLoad] static class Autorun { static Autorun() { PublisherAnalytics.Initialize("UA-XXXXXXXXX-X", "1.0.0"); } }
-
Track events in your code:
PublisherAnalytics.TrackEvent("My Category", "My Event");
- Open Google Analytics Dashboard: https://analytics.google.com/
- Create a new Custom Report:
- Add
Sessions
metrics andApp Version
dimension:
- Save the report