Unity User Profiles

User Profiles

πŸ“˜

Note

If you are using Unity SDK v3.0.0, use Clevertap instead of ClevertapBinding method.

Update User Profile(Push Profile)

Dictionary<string, string> newProps = new Dictionary<string, string>();
newProps.put("Name", "Jack Montana");    // String
newProps.put("Identity", "61026032");      // String
newProps.put("Email", "[email protected]"); // Email address of the user
newProps.put("Phone", "+14155551234");   // Phone (with the country code, starting with +)
newProps.put("Gender", "M");             // Can be either M or F
CleverTapBinding.ProfilePush(newProps);

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("email", "[email protected]");
newProps.Add("Identity", "123456");
newProps.put("Name", "Jack Montana");    // String
newProps.put("Identity", "61026032");      // String
newProps.put("Email", "[email protected]"); // Email address of the user
newProps.put("Phone", "+14155551234");   // Phone (with the country code, starting with +)
newProps.put("Gender", "M");             // Can be either M or F
CleverTapBinding.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);