Welcome to the
WalkMe Help Center
Please log in to continue
Please log in to continue
A variable stores information about a user on a web page, like their role, department, email, or user ID. WalkMe reads variables to show each user only the content relevant to them, and to track individual users in analytics.
WalkMe reads any variable available in the page's global window scope. When you use a variable in a rule, WalkMe checks its value in the user's browser and compares it to that rule.
For example, if your site has <span class="coded">var region = "North America"</span> and you create a segment where region is North America, items in that segment play only for users whose region value is North America.
Unlike cookies, a variable stays tied to the same user even after they clear their cache or switch browsers, as long as it's available on every page.
Variables are commonly used to Segment your WalkMe assets. To use your variable in a Segment.
Use a variable in Dynamic Text in the Rich Text Editor to show user-specific information, like a first name or the days left in a trial, in a balloon or ShoutOut. In Source view, the variable shows as BBCode. Preview stays blank, and the user's value appears after you publish.
Onboarding Tasks track each user's progress individually, so they need a variable to identify the user. Set it in the General Settings tab.
Configure a variable that returns the user's name so analytics reports show individual users. Set it in Unique User Settings. For WalkMe for Salesforce, use UserContext.userName.
If the value you need isn't in a variable yet, ask your development or IT team to add one. Tell them what the variable should capture, its possible values, and the name you'd like to use.
For example, a variable that returns the user's role:
WalkMe can only read variables attached to the window object:
Group the variables in one object, then attach the object to the window: