Why use it
Start a Guide with a custom trigger natively in your application if you want to customize the user experience.
You can use the trigger command to start a Guide, e.g. within a specific button.
ℹ️ Please note that commands play the Guide and do not take any Segmentation settings into consideration.
Start a Guide
// TODO: replace 12345 with your Guide ID
Userlane('start', '12345');
Start a Guide only once per User
// TODO: replace 12345 with your Guide ID
Userlane('startOnce', '12345');
You can look up the Guide ID in the Userlane Portal and insert it in one of the commands listed below.
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 Portal. The step number in the Editor or Portal starts at 1.
Example: If you want to start the Guide at step 11, you have to insert the index 10.
// TODO: replace 12345 with your Guide ID
// TODO: replace 4 with the index of the step
Userlane('start', '12345', 4);
💡 Good to know
When you're signed in to the Userlane Portal, the start command will work even when you've set the Guide to 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.