Skip to main content

Variables

Variables bring details from your website into the bot: a member ID in the embed code, a campaign in the link, the page the visitor started the chat from. You can use them in your messages, give them to the AI, and save them with every response.

You configure them in Settings → Variables.

How they work​

The tab follows three steps:

  1. Define it — name the variable and choose where the value comes from.
  2. Pass it — add it to your embed code or link, or let the bot read the page it is on.
  3. Use it — type {{name}} in your welcome message, flow messages, and AI block prompts.

Add a variable​

Use Quick add for the most common cases:

  • Page URL — the address of the page where the visitor starts chatting.
  • Page title — the title of that page.
  • URL parameter — a parameter in the link, for example ?campaign=spring.
  • Embed code — a value you pass in through the embed code.

You can also create a variable from scratch with Add variable: name, value source, and an optional default value (used when the page passes nothing).

Use the variables​

  • In messages (welcome, flow, AI blocks) type {{name}}.
  • AI chats receive the values automatically.
  • AI Actions with a field of the same name fill themselves in, but only from embed code, page URL, and page title values: URL parameters do not fill fields, though the AI still sees them and can use them.
  • Variables become a column in Responses, in exports, and in integrations (email, Google Sheets, Zapier, Make…).

Limits and warnings​

Values you cannot trust

Values come from the visitor's browser, so anyone can change them. Use them to personalise the chat, not to prove who someone is.

  • Up to 20 variables per bot, 500 characters each.
  • Default values are visible to the visitor and the AI; never put passwords, payment details, or other secrets in them.
  • Values are read when a conversation starts and stay the same until it is reset. The builder preview uses default values.
  • Saved values are stored with the response and sent to your integrations: if they are personal, mention them in your privacy notice.

Add variables to your site​

The bot's embed code is on the same tab:

<script async src="https://lite.neoagent.co/w/chat_plugin.js" data-bot-id="YOUR_BOT_ID"></script>

Add data-var-… attributes to pass your own values. The same attributes work on the inline and GoHighLevel embed codes. Page URL and page title are read automatically, so there is nothing to add for them.