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.

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');

You can look up the Guide ID in the Userlane Portal and insert it in one of the commands listed below.
⇨ Start this Guide to learn how.

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 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 singed 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.