Deploy WalkMe Using a JavaScript Snippet
Brief Overview
The WalkMe snippet is what allows WalkMe to run on your site. Pages or browsers that include the snippet are able to access published WalkMe files on a server, allowing users to access and play content.
The snippet is a piece of JavaScript code that must be running in a user's browser for WalkMe to work on the page. Each snippet is tied to a specific WalkMe Editor account. When items are published in the WalkMe Editor, they are accessible to users that have the associated snippet running on their browser.
Follow the steps below to deploy WalkMe using a snippet.
Deployment Guide
1. Obtain the snippet code
The snippet code is available from the WalkMe Editor. Learn how to install the editor.
- Click the Settings icon in the editor to open System settings
- Go to the Snippet tab
- Select the correct environment from the dropdown (Test/Production)
- Each environment has a slightly different snippet code
- If you have a test/sandbox/staging site, select the Test snippet
- If you would like the snippet for publishing to your end-users, select the Production snippet
- Click Copy Code to copy the snippet
2. Access your website's backend
- Log in to the backend or content management system (CMS) of your website
3. Locate the header/footer section
- Navigate to the section of your CMS that allows you to edit the header or footer of your website
4. Edit the header/footer
- In the header/footer section, find the section where you can add custom code or scripts
5. Add the snippet code
- Paste the snippet code (copied in step 1) into the designated area in the header/footer section of your CMS
6. Save the changes
Save the changes in your CMS and the WalkMe Editor.
- Save the changes in your CMS after pasting the Snippet Code to the header/footer section
- Note: This action may involve pressing a "Save," "Update," or "Publish" button
- Go to System settings in the editor
- In the General tab, click Publish settings
7. Verify installation
- Visit your website and go to the specific page where you want the snippet code to work
- Inspect the page to make sure that the desired functionality or feature is now active
- If you notice that the Snippet Code is not working as expected, double-check the placement of the code
- If you still have issues, you can reach out to our support team for assistance
Once the snippet is in place, you will be able to see your published content from the Editor. To test the snippet and 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
- Undefined = The snippet is not set up properly and you should contact support for assistance
That's it! You have successfully installed the snippet code on your website. If you have any further questions or need assistance, please don't hesitate to reach out to us.