HELP FILE

Create a custom button that triggers guidance

The guidance studio creates a button that runs the guides, in order to create a customize button, that can be set anywhere in the page, please follow the instructions below :

1. Implementing the guidance script in the head tag

Open the guidance studio, click on the relevant guide settings and copy the script in the "script code" box (make sure to un-check Search, Button, and First Visit), paste that code inside the head tag in the relevant web page.

2. Creating the button

Create a button tag and add the following JS event to the button tag :

onclick="window.postMessage('subject=runGuidance&guideId=912000372&stepId=912000392', '*');"

The marked areas should be replaced to the relevant guide and step ID's.

The result should look like this :

<button>            onclick="window.postMessage('subject=runGuidance&amp;guideId=912000372&amp;stepId=912000392', '*');"            >Start the guide </button> 

3. Enter the relevant guide and step ID's in the button script

3a. Go to the site you implemented the guidance script in the head tag and open the developers tools (F12).

Go to Network and search for the call "getAllGuidesWithoutSteps", click on that call in the information window choose "Preview" and search for the guidance ID.

Paste that ID to the button script guideid="" (marked in yellow)

3b. Go to the site you implemented the guidance script in the head tag and open the developers tools (F12).

Go to Network and search for the call "getSteps",

Note that every guide will create its own call, at the end of each call you will see the guide ID.

Choose the relevant call, in the information window choose "Preview" and search for the step ID.

Paste that ID to the button script stepid="" (marked in red).

Save the changes, refresh the page and every time you press the button you created, the guide will start running from the step you set in the button.