How to redirect visitors to another URL in the same window

If you want to see how it works, click on the widget in the bottom right of your screen ;)

In case we need to redirect users but keeping them in the same window (tab), the process is as follows:

  1. In our builder flow we add a Code Block after a button like in the picture below:

With the following code:

Landbot.send('sendto','https://www.landbot.io')

Change the url according to your needs.

  1. In the site where the bot is embeded you need to add the following code (it will trigger the redirection):

myLandbot.on('sendto',(data) => {
window.location.href = data;
})


How did we do?


Powered by HelpDocs

Powered by HelpDocs