Skip to content

Latest commit

 

History

History
32 lines (29 loc) · 1.2 KB

README.md

File metadata and controls

32 lines (29 loc) · 1.2 KB

Unity Asset Store Publisher Analytics

Google Analytics Wrapper for collecting anonymous statistics from the Unity Asset Store plugin users.

Usage

  • 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");
    

    Custom Reports

    • Open Google Analytics Dashboard: https://analytics.google.com/
    • Create a new Custom Report:
      1
    • Add Sessions metrics and App Version dimension:
      2
    • Save the report