/// <summary> /// Set the postal code (i.e.: the ZIP code in the US) of the user, if known. This is an alternative to setting the exact location but can provide similar benefits to ad revenues / targeting. /// </summary> public static void SetUserPostalCode(string postalCode) { #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE) #if UNITY_ANDROID HeyzapDemographicsAndroid.SetUserPostalCode(postalCode); #elif UNITY_IPHONE HeyzapDemographicsIOS.SetUserPostalCode(postalCode); #endif #else #endif }
/// <summary> /// Set the household income of the user, if known. /// </summary> public static void SetUserHouseholdIncome(int householdIncome) { #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE) #if UNITY_ANDROID HeyzapDemographicsAndroid.SetUserHouseholdIncome(householdIncome); #elif UNITY_IPHONE HeyzapDemographicsIOS.SetUserHouseholdIncome(householdIncome); #endif #else #endif }
/// <summary> /// Set the location of the user, if known. The required parameters match the parameters provided by the UnityEngine `LocationInfo` struct - see `https://docs.unity3d.com/ScriptReference/LocationInfo.html` for more information. /// </summary> public static void SetUserLocation(float latitude, float longitude, float horizontalAccuracy, float verticalAccuracy, float altitude, double timestamp) { #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE) #if UNITY_ANDROID HeyzapDemographicsAndroid.SetUserLocation(latitude, longitude, horizontalAccuracy, verticalAccuracy, altitude, timestamp); #elif UNITY_IPHONE HeyzapDemographicsIOS.SetUserLocation(latitude, longitude, horizontalAccuracy, verticalAccuracy, altitude, timestamp); #endif #else #endif }
/// <summary> /// Set the birth date of the user, if known, using this format: `YYYY/MM/DD`. Example: `2000/12/31` for December 31st, 2000. /// </summary> public static void SetUserBirthDate(string yyyyMMdd_date) { #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE) #if UNITY_ANDROID HeyzapDemographicsAndroid.SetUserBirthDate(yyyyMMdd_date); #elif UNITY_IPHONE HeyzapDemographicsIOS.SetUserBirthDate(yyyyMMdd_date); #endif #else #endif }
/// <summary> /// Set the gender of the user, if known, using the provided enum. /// </summary> public static void SetUserGender(Gender gender) { if (System.Enum.IsDefined(typeof(Gender), gender)) { #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE) #if UNITY_ANDROID HeyzapDemographicsAndroid.SetUserGender(gender.ToString()); #elif UNITY_IPHONE HeyzapDemographicsIOS.SetUserGender(gender.ToString()); #endif #else #endif } }
/// <summary> /// Set the highest education level already achieved by the user, if known, using the provided enum. /// </summary> public static void SetUserEducationLevel(EducationLevel educationLevel) { if (System.Enum.IsDefined(typeof(EducationLevel), educationLevel)) { #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE) #if UNITY_ANDROID HeyzapDemographicsAndroid.SetUserEducationLevel(educationLevel.ToString()); #elif UNITY_IPHONE HeyzapDemographicsIOS.SetUserEducationLevel(educationLevel.ToString()); #endif #else #endif } }
/// <summary> /// Set the marital status of the user, if known, using the provided enum. /// </summary> public static void SetUserMaritalStatus(MaritalStatus maritalStatus) { if (System.Enum.IsDefined(typeof(MaritalStatus), maritalStatus)) { #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE) #if UNITY_ANDROID HeyzapDemographicsAndroid.SetUserMaritalStatus(maritalStatus.ToString()); #elif UNITY_IPHONE HeyzapDemographicsIOS.SetUserMaritalStatus(maritalStatus.ToString()); #endif #else #endif } }