Unity User Profiles
User Profiles
Note
If you are using Unity SDK v3.0.0 or higher, use
Clevertap
instead ofClevertapBinding
method.
Update User Profile(Push Profile)
Dictionary<string, string> newProps = new Dictionary<string, string>();
newProps.Add("Name", "Jack Montana"); // String: User's name
newProps.Add("Identity", "61026032"); // String: Unique user ID
newProps.Add("Email", "[email protected]"); // Email address of the user
newProps.Add("Phone", "+14155551234"); // Phone number with country code (+)
newProps.Add("Gender", "M"); // Can be either "M" or "F"
CleverTap.ProfilePush(newProps); // For SDKs v2.4.2 or below, use CleverTapBinding.ProfilePush instead of CleverTap
Set Multi Values For Key
List<string> StringList = new List<string>();
StringList.Add("one");
StringList.Add("two");
CleverTapBinding.ProfileSetMultiValuesForKey("userProps", stringList);
Remove Multi Value For Key
List<string> StringList2 = new List<string>();
StringList2.Add("two");
CleverTapBinding.ProfileRemoveMultiValuesForKey("userProps", stringList2);
Add Multi Value For Key
List<string> StringList1 = new List<string>();
StringList1.Add("three");
StringList1.Add("four");
CleverTapBinding.ProfileAddMultiValuesForKey("multiIOS", stringList1);
Create a User profile when the user logs in (On User Login)
Dictionary<string, string> newProps = new Dictionary<string, string>();
newProps.Add("Name", "Jack Montana"); // String
newProps.Add("Identity", "61026032"); // String
newProps.Add("Email", "[email protected]"); // Email address of the user
newProps.Add("Phone", "+14155551234"); // Phone (with the country code, starting with +)
newProps.Add("Gender", "M"); // Can be either M or F
CleverTap.OnUserLogin(newProps);
Get CleverTap Reference ID
string CleverTapID = CleverTapBinding.ProfileGetCleverTapID();
Set Location to User Profile
CleverTapBinding.SetLocation(34.147785, -118.144516);
Increment a User Profile property
CleverTapBinding.ProfileIncrementValueForKey("add_int",2);
CleverTapBinding.ProfileIncrementValueForKey("add_double",3.5);
Decrement a User Profile property
CleverTapBinding.ProfileDecrementValueForKey("minus_int",2);
CleverTapBinding.ProfileDecrementValueForKey("minus_double",3.5);
Updated 23 days ago