Analytics events
Unity collects Analytics data by dispatching events when someone uses your application or game. Unity dispatches a set of core events automatically. You can dispatch additional events to collect richer and deeper information about how users play your game or use your application.
The types of Analytics events include:
-
Core Events: Session-based and device-based events.
-
Standard Events: Behavioral events with standard names and parameters for tracking user experience and player behavior.
-
Custom Events: Fully-customizable events whose names, purposes and parameters you define as needed.
-
Transaction Events: Specialized events you can use to track in-app purchase (IAP) transactions made through 3rd-party IAP APIs.
- Other: Specialized events, like Heatmap events, intended for a specific purpose. Such events are usually based on Custom Events, but the APIs for sending them control the event names and parameters.
Unity dispatches Core Events automatically. You must dispatch the other types of events at the appropriate times. You can dispatch Standard and Custom Events from an Analytics Event Tracker Component or from a script.
Your Unity game or app sends Analytics events to a Unity web service. The Analytics system collects the raw events and processes them for display on your project’s Analytics Dashboard. If the computer or device running the application cannot connect to the web service, Unity caches the events locally until the connection becomes available.
Note: If you have a Unity Pro subscription, you can download the raw event data directly. You can import this raw data into your own analytics tools and perform ad-hoc analyses that may not be supported by the Unity Analytics Dashboard.
Standard Events versus Custom Events
Standard Events are a form of Custom Event. The difference is that Standard Events are standardized. Each Standard Event has a predefined event name and a set of required parameters. Standardization provides several benefits:
- Helps avoid easy-to-make coding errors, such as using slightly different names and parameters for what should be the same event.
- Provides a guide for useful places in your application to dispatch an Analytics event.
- Provides a known context for an event, which the Unity Analytics system can use to provide more meaningful Analytics reports.
Because of these benefits, you should use Standard Events rather than Custom Events whenever possible. Only use Custom Events when no Standard Event is appropriate.
2018–03–02 Page published with no editorial review
2018–06–04 - Service compatible with Unity 5.2 onwards at this date but version compatibility may be subject to change
New feature in 5.2
2018–06–04 - Demographics event removed
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.unity3d.com.
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thanks for helping to make the Unity documentation better!