Welcome to the
WalkMe Help Center
Please log in to continue
Please log in to continue
To create User Attributes, you must both add them to the Mobile Console and your developers must use the WalkMe Mobile SDK API to set them up in your app.
This step is mandatory for all User Attributes. Add the Attributes reference in the Console to use Attributes in segments and Rule-Based Goals.

To protect your end-users' privacy and your app's sensitive data, you can set a User Attribute as private. This setting prevents WalkMe from storing the private User Attribute data, and this data will not be taken into account when WalkMe Mobile AI provides predictions about your end-users' behavior, nor will it be saved for analytics purposes.
Starting from version 1.18.0, the WalkMe SDK is able to fetch data from the device's SharedPreferences (Android) or UserDefaults (iOS), and store it in User Attributes.
This means these User Attributes can be set without calling the WalkMe SDK API, making setting up these attributes a lot quicker and frictionless. All you need to do is just check with your developers if the values you want to use already exist in the SharedPreferences / UserDefaults.
In iOS, WalkMe can easily access any key set on the UserDefaults. In the console, simply set the attribute with the same name as the UserDefaults key.
In Android, the SharedPreferences is not a single pool of variables, but instead broken down into different sections (each section is called SharedPreferences).
In the console, to set up a User Attribute by one of the SharedPreferences keys, it needs to be referenced according to this convention: [SharePreferences section name].[key name] , for example: telcosp.username .
Your developers should implement the following code:
/** Regular User Attributes **/ +(void)setUserAttributeWithKey:(NSString *)key andValue:(id)value; +(void)setUserAttributes:(NSDictionary<NSString*,id> *)attributes; /** Private User Attributes **/ +(void)setPrivateUserAttributeWithKey:(NSString *)key andValue:(id)value; +(void)setPrivateUserAttributes:(NSDictionary<NSString*,id> *)attributes; /** Clearing Private User Attributes (if needed) **/ +(void)clearPrivateUserAttributes;
Your developers should implement the following code:
/** Regular (non private) User Attributes **/ public static void setUserAttribute(String key, Object value) public static void setUserAttributes(Map<String,Object> attributes) /** Private User Attributes **/ public static void setPrivateUserAttribute(String key, Object value) public static void setPrivateUserAttributes(Map<String,Object> attributes) /** Clearing Private User Attributes (if needed) **/ public static void clearPrivateUserAttributes()
The same API used for setting a single value user attribute can also be used for setting a User Attribute that represents an array.
[ABBI setUserAttributeWithKey:@"numbers" andValue:@[@"1", @"2"]];
ABBI.setUserAttribute("numbers", new ArrayList<>(Arrays.asList("1", "2", "3")));
To test that a User Attribute was added successfully, you can check that it appears in the "User Attributes" section available in the App Info screen in Power Mode.