start, startOnce - Trigger a userlane in your code

Start a Guide with a custom trigger natively in your application.

You can use the trigger command to start a Guide, e.g. within a specific button.

You can find the trigger command for a specific Guide in the Userlane Dashboard.
⇨ Start this Guide to learn how.

Alternatively, you can look up the Guide ID in the Userlane Dashboard and insert it in one of the commands listed below.
⇨ Start this Guide to learn how.

Start a Guide

// TODO: replace 12345 with your userlane id
Userlane('start', 12345); 

Start a Guide only once per User

// TODO: replace 12345 with your userlane id
Userlane('startOnce', 12345);

Calling this command will also fire the onStart event.

Start a Guide at a specific step

Important: The index of the step starts at 0. It is different from the step number that you see in the Editor or Dashboard. The step number in the Editor or Dashboard starts at 1.

Example: If you want to start the Userlane at step 11, you have to insert the index 10. 

// TODO: replace 12345 with your userlane id
// TODO: replace 4 with the index of the step
Userlane('start', 12345, 4);

Good to know:

  • When you're logged in to the Userlane Dashboard the start command will work even when you've set the Guide tp private. You can use this to test if the trigger works. Your end users won't see the Guide when it's set to private.