Workarounds & Codes

Proactive message on mobile

Having troubles viewing your amazing Proactive Message on your phone? Let's get that fixed! Showing correctly the Proactive message essentially depends on the width of the device being used; in order…

Pau Sanchez
Updated 2 months ago by Pau Sanchez

Different ways to format numbers with JS

In Landbot 3 Transform 1000 to 1,000 First, we ask for a number and store it in the @number variable. With a Code block we add the function that will transform the number: function fixValue(value){ r…

Pau Sanchez
Updated 6 months ago by Pau Sanchez

How to not display Proactive Message to repeating Visitors

Here is the code you need to use in the page where you added the code to display the bot, to stop displaying the Proactive message to repeating visitors Landbot 3 <script> window.onload = function ()…

Pau Sanchez
Updated 8 months ago by Pau Sanchez

Random 4 digits Number (Web)

Generate a 4 digits random number to be used in a variable to verify a phone number. Send this number to a third party app and validate your users by checking if their input matches or not, therefore…

Pau Sanchez
Updated 2 days ago by Pau Sanchez

Set the flow depending on the url path (for embedded landbots)

Only for landbots embedded (not standalone). Do not test in Preview mode. We might want to personalise the experience of the visitor to our site with different "chatbots" depending on the section tha…

Pau Sanchez
Updated 7 months ago by Pau Sanchez

Trigger a Global Keyword with JS (web v3)

Global Keywords allows you to set paths, based on a specific Keyword. Thanks to Landbot SDK we can trigger a Message via Javascript, that can trigger the sending of a message, that will trigger the g…

Pau Sanchez
Updated 5 months ago by Pau Sanchez

Generate a URL that has variables from user answers

It can happen that at the end of the flow you want redirect your clients to a specific website. It can be also the case that you want to generate a URL with the values provided by the users and that…

Pau Sanchez
Updated 2 years ago by Pau Sanchez