Unity Analytics 可以跟踪用户的受众特征。这为您提供了可靠的方式来过滤数据以便查看不同的用户细分段。此信息是从注册时输入的玩家信息或第三方 SDK 中提取的。
// 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. |
例如:
Gender gender = Gender.Female;
Analytics.SetUserGender(gender);
int birthYear = 2014;
Analytics.SetUserBirthYear(birthYear);