Using dynamic URLs for your walkthroughs
- 1 minute to read
Whatfix offers the flexibility to re-use walkthroughs across different domains or versions of your application. For example, you may have a development and production environments. In such cases you can use the dynamic URL feature to ensure that your walkthroughs work in both environments.
Setting a dynamic URL
While creating your walkthrough, all you need to do is wrap the dynamic portion of your URL with curly braces as shown below.
Replacing dynamic portion via script
When Whatfix flows are used inside the application, you might already know this dynamic portion. Use the following script to inform Whatfix about the dynamic portion. By informing Whatfix about it, one can avoid asking the user to type in an already known portion of URL.
window._wfx_settings.dynamic = window.location.host;
By using the above script in your pages, Whatfix self help widget (or any other embed options) will replace dynamic portion in the URL with current page host.
If you have multiple dynamic portions in the URL, separate them with a comma.