Version: 2017.3 (switch to 2017.4)
Receipt Verification
Unity Analytics Raw Data Export
Other Versions

User Attributes

Unity Analytics offers the ability to track user demographics. This provides you with robust ways to filter your data to look at different user segments. This information is pulled from player information entered at signup or from third-party SDKs.

// Reference the Unity Analytics namespace
  using UnityEngine.Analytics;

  // Use this call to designate the user gender
  Analytics.SetUserGender(Gender gender);

  // Use this call to designate the user birth year
  Analytics.SetUserBirthYear(int birthYear);
Input Parameters
Name Type Description
gender enum Gender of user can be Gender.Female, Gender.Male or Gender.Unknown.
birthYear int Birth year of user. Must be 4-digit year format only.

For example:

  Gender gender = Gender.Female;
  Analytics.SetUserGender(gender);

  int birthYear = 2014;
  Analytics.SetUserBirthYear(birthYear);

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

Receipt Verification
Unity Analytics Raw Data Export