Top
Using dynamic URLs for your walkthroughs
  • 1 minute to read
  • Print
  • Dark
    Light

Using dynamic URLs for your walkthroughs

  • Print
  • Dark
    Light

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.

Note
The screen below can be accessed on your dashboard. Open the content that you want to edit and navigate to the last step.

flow_edit_curlyBraces.png

Note
When "see live" is used for such a walkthrough on the dashboard, Whatfix prompts the flow creator to change domain portion of URL. However, when the walkthrough is launched in the application, Whatfix automatically understands the change and runs the walkthrough dynamically on all variations of the URL.

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.

Note
Whatfix business users can place this script in their admin/integration section. Users of the application are not required to change anything or manually provide the web address. Whatfix picks the current URL automatically.
Was this article helpful?