Version: 2017.3 (switch to 2017.4)
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.


class in UnityEngine.Analytics

Suggest a change


Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.


Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.




Unity Analytics provides insight into your game users e.g. DAU, MAU.

Note: The documentation that follows is for usage of Unity Analytics with Unity 5.1 and above. To integrate Unity Analytics with earlier versions of Unity, refer to the documentation at

Specifically, out-of-the-box features include access to user engagement and retention data through Metric Monitor and Data Explorer. Segmentation of players across various user dimensions and characteristics is automatically applied, with more than 20 standard segments available without any additional instrumentation.

For more detail around features, refer to the Unity Analytics homepage at

Static Properties

deviceStatsEnabledControls whether the sending of device stats at runtime is enabled.
enabledControls whether the Analytics service is enabled at runtime.
limitUserTrackingControls whether to limit user tracking at runtime.

Static Methods

CustomEventCustom Events (optional).
FlushEventsAttempts to flush immediately all queued analytics events to the network and filesystem cache if possible (optional).
SetUserBirthYearUser Demographics (optional).
SetUserGenderUser Demographics (optional).
SetUserIdUser Demographics (optional).
TransactionTracking Monetization (optional).

Did you find this page useful? Please give it a rating: