Help Center
Welcome to the WalkMe Help Center

Please login in order to continue:

Work flows better with WalkMe
Work flows better with WalkMe.

Variables

Last Updated August 5, 2024

Brief Overview

A 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.

Variables 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 Smart Walk-Thrus for users in geographic regions, or for Admins
  • Associate WalkMe activity in Analytics with unique users
Make sure the variable is available on every page

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.

How It Works

A variable is a storage location with a symbolic name (otherwise known as an identifier) which contains some quantity. For example:

  • var x = 5
  • var username = dan.adams@company.com
  • 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.

🎓 Digital Adoption Institute

Using Variables For Segmentation

Variables are commonly used to  Segment your WalkMe assets. To use your variable in a Segment.

  1. Open the Segmentation Center;
  2. Create a New Segment or Edit an existing one;
  3. Click Define this Segment;
  4. Select User Data from the Rule Type, then select Variable.

Using Variables in the Rich Text Editor

Use a variable in Dynamic Text in the Rich Text Editor to search for a user's specific information and place it in a ShoutOut or balloon to make it personalized to the user. In the example below, we had a variable for first name (name) and the number of days left in a trial account (trial). To use Variables with Dynamic Text, talk to your web developer about which variables are available for WalkMe to use. A variable must be available in the window object for WalkMe to access them. Notice that the editable field will display the variable in BBcode when in Source and the Preview view will not display any text but in Published mode, it will pull in the user's variable.

Using Variables in Onboarding

When creating 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.

Using Variables For Analytics

It's recommended to configure a variable that retrieves the end user's name, so that the Analytics are as specific as possible. If you use WalkMe for Salesforce you can use the variable “UserContext.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.

  1. Type in your variable name;
  2. Select an operator and enter the variable value you are trying to Segment by.

Creating Variables

If the value you would like to use is not accessible in a variable, speak to your Development or IT Team about adding it to your site. In order to effectively communicate to the relevant team, outline what your variable is supposed to measure (the different values) and the name of the variable you'd like created.

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();

Attaching a Variable to the Window

Once the variable or object has been defined, attach the variable to the window object.

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.

Exposing More Than One Variable

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.

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 Out

Create 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.

Was this article helpful?

Thanks for your feedback!

Be part of something bigger.

Engage with peers, ask questions, share ideas

Ask the Community
×