VariablesA Variable contains useful information about a user that is stored on a web page such as role, access level, department, email or user ID. WalkMe can use this information to help target specific users and ensure a user will see only content relevant to them.
The Short VersionVariables can be used to Segment the WalkMe assets you build to ensure that only content relevant to that user type is visible. Variables can also store information unique to the user such as an email or ID number to create Analytics reports about individual users to monitor their usage of WalkMe and completion of important businesses processes.
For example, variables can be used to:
- Identify power users on your site
- Segment Walk-Thrus for users in geographic regions, or for Admins
- Associate WalkMe activity in Analytics with unique users
- var x = 5
- var username = firstname.lastname@example.org
- var region = North America
If you point to (identify) var region in the WalkMe Editor, it will search for the variable on the user’s browser page. It will then use that value to compare to the rules you write using variables in the WalkMe Editor. If you create a segment for var region is North America, any items in that segment will only play when the user’s variable is North America. In other words, before displaying the Walk-Thrus in the North America segment, WalkMe will check to see whether the variable on the user’s browser is North America.
As long as the variable is on each page, it will be associated with the same individual even if the cache is cleared or a user accesses your site in another browser (unlike Cookies). WalkMe will pull in the variable’s value to use in a rule or unique user tracking. Any variable which is accessible from the global window scope can be read by WalkMe.
Variables already in your system can be easily adapted so that WalkMe can point to them.
Segment your WalkMe assets. To use your variable in a Segment.
- Open the Segmentation Center
- Create a New Segment or Edit an existing one
- Click Define this Segment
- Select User Data from the Rule Type, then select Variable
Onboarding Tasks, you must configure a variable in the General Settings tab. The Onboarding list, as opposed to the standard Menu, is individual per end user, and reflects each end user’s progress. Use a variable to ensure that WalkMe is tracking that specific user’s progress.
Analytics are as specific as possible. If you use WalkMe for Salesforce you can use the variable “walkme_sf_vars.userName." Configure the variable in Unique User Settings.
Once the variables have been created and identified, you will need to configure WalkMe to look for them. This configuration applies only to variables that are being used for Analytics purposes or for the Onboarding App. No configuration is necessary if the variables are being used solely for Segmentation. Note that any variables configured in this manner will still be available for use in the Segmentation Center.
- Type in your variable name
- Select an operator and enter the variable value you are trying to Segment by.
For example, you could have a variable called User_Profile that contains values such as Admin, Sales, Marketing, Management, or any data you already store about your user. Declare a new variable called user role using the object name and a function to call the relevant data.
Variables already in your system can be easily adapted so that WalkMe can point to them. In order for WalkMe to read a variable, it must be attached to the window object.
For example, a new variable called user role is declared using the object name and a function to call the relevant data. The object can relate to any data you already store about your user.
var userRole = user.getUserRole();
window.userRole = userRole
Once you have identified or created a variable and it is attached to the window, we can configure WalkMe to track or segment by this information.
If you plan on exposing more than one variable to WalkMe, the best practice is to create an object that contains all the variables you’d like to use.
Exposing More Than One Variable
For example, create an object: company_variables = new Object(). The following variables are contained within the object:
- company_variables.userID = user.getUserID()
- company_variables.roleID = user.getRoleID()
- company_variables.departmentID = user.getDepartmentID()
- window.company_variables = company_variables
Once the object is created, it must be attached to the window object.
Try it OutCreate a Segment in the Segmentation Center that identifies a specific group of users by a variable, for example, region, or role. Add Walk-Thrus and Resources to this Segment to ensure that only relevant users see them.