Hidden Fields (Get parameters from url and use it as variables)

Get parameters from url and use it as variables

Now you can send variables through the URL (params) to the bot. If you need your user's email, you don't need to ask for it again! Let's learn how to configure these hidden fields in a minute!

Hidden Fields functionality only works with lower case. If the parameter in the URL has Capital Letters, it won't be recognised
  1. First, in the builder select the Chatbot Settings (wheel) on the right menu and select Hidden fields:

  1. Now, add the fields you want to send using the URL by typing their name and pressing enter. Keep in mind that you need to use the same field names as in the URL so Landbot can match them:

  1. Add the variables to your URL. For example, if you want to use "email" and "name" as hidden fields, you need to add this:


    And your landbot's URL should look like this:


You can display these fields in the flow to hyper-personalize the experience, or keep them in the shadow to nurture your users' information. 

 If you're using apps like MailChimp or Intercom, you can add dynamic fields to a URL so you can bulk send personalized URLs. 
Please bear in mind the system to accept the numbers 0 and 1 on it's own, they need to be passed as decimals:


Restricted keywords

These are keywords you are not allowed to use as a hidden fields (parameters) in the url:

  • location
  • welcome
  • message

The use of these words might generate an error like below:

Passing javascript variables from the Container Site to the bot

If you have javascript variables in the global scope in the container site, ready before the bot is loaded. You can pass variables too, by adding them as a parameters in the index url of the embedding script, and using Hidden Fields to use them in the bot too.

<script src="https://static.landbot.io/landbot-widget/landbot-widget-1.0.0.js"></script>
var myLandbot = new LandbotLivechat({
index: 'https://landbot.io/u/XXXX/index.html?name='+containerNameVariable+'&email='+containerEmailVariable,

How did we do?