WalkMe Snippet and Deployment Method Overview
What is the Snippet?
The snippet is a piece of JavaScript code that allows WalkMe to appear on your site. Each WalkMe Editor account has a unique snippet code that can be accessed inside the Editor:
Environments
If you have a Test site, you may choose to first publish your WalkMe items to this site before publishing to your end-users on your Production site. The Snippet is slightly different for each environment. Since the Snippet is different for each environment, you will need to deploy it separately for each environment.
Deploy the Test Snippet for your Test (or Sandbox or Staging) site; then items published to Test will appear on your Test site. Similarly, deploy the Production Snippet for your site; then items published to Production will appear on your Production site.
It is also possible to create custom Environments suitable for your individual business needs. Read more here.
Where Can I Find the Snippet?
- Select “Snippet” from inside the Editor Menu
- Select an environment
- Each environment has a slightly different snippet code. If you have a test/sandbox/staging site, copy the snippet for Test. If you would like the snippet for publishing to your end-users, copy the snippet for Production.
- Each environment has a slightly different snippet code. If you have a test/sandbox/staging site, copy the snippet for Test. If you would like the snippet for publishing to your end-users, copy the snippet for Production.
- Copy the snippet code:
- WalkMe Enabled Toggle Switch
- If for some urgent reason you must disable WalkMe in any environment, you may simply click the WalkMe Enabled toggle. Once toggled OFF, the WalkMe snippet will be deactivated.
- If for some urgent reason you must disable WalkMe in any environment, you may simply click the WalkMe Enabled toggle. Once toggled OFF, the WalkMe snippet will be deactivated.
Methods For Deploying the Snippet
Deployment is a simple, one-time task done by your IT team.
There are several ways to deploy the WalkMe snippet. The correct one for you depends on the specifics of your application. Click on each link below to learn more about these options:
- If you have access to your application’s HTML, we recommend simply pasting the snippet into the head tag of each page on which you want WalkMe content to appear. Read more here.
- If you don’t have access to your application’s HTML (or don’t want to alter it for whatever reason), we recommend inserting the snippet by mass deploying the Player browser extension. Read more here.
- A third option for expediting the process of inserting the snippet is using Google Tag Manager. Read more here.
After adding the snippet, perform a settings publish (Settings > Publish Settings) to all relevant environments from the WalkMe Editor to generate the files and allow WalkMe to load properly on the site. Without a settings publish, WalkMe files will not load properly and a 403 error will display in the code’s network requests.
How do I Test that the Snippet is Working?
Once the snippet is in place, you will be able to see your published content from the Editor. To test the snippet to make sure it’s set up correctly:
- Open your site
- Right-click and select inspect the page
- Open the console
- Enter the following text query:Â _walkMe.getEnvId()
- This command will return a value indicating which environment loaded:
0=Production
1=Preview
2=Play
3=Test - If it returns undefined, the Snippet is not properly set up and you can contact Support for assistance
- This command will return a value indicating which environment loaded: