Usetiful supports running custom JavaScript code directly within tour steps — perfect for automating UI actions or triggering custom behavior. This feature is available for users with Two-Factor Authentication (2FA) enabled.


Step 1:

To use JavaScript in your tours, 2FA must be enabled for your Usetiful account.

  1. Go to the Admin section of your Usetiful dashboard.

  2. Click Accounts Settings.

  3. Toggle the switch to enable 2FA, (Find out more here).

Note: To add JavaScript you must have 2FA enabled.

Step 2: 

Add JavaScript to a Tour Step

  1. Open the Tour Editor.

  2. Select the tour step where you want to add code.

  3. Click the <> (code) icon.

  4. Add your JavaScript inside a <script> tag:

  5. Save and publish your tour.


Tips

  • Avoid heavy logic or manipulations that might disrupt the user experience.

  • Preview your tour and ensure your JavaScript executes correctly across environments.

  • Never expose sensitive data through scripts embedded in tours.

By following the steps above, you can effectively run JavaScript code through your Usetiful tours to deliver a more dynamic and responsive user experience.