Sign In
Sign In
  1. Home
  2. APIs
  3. Widget Javascript API
  4. Widget Attributes
APIs
37 articles
WhatsApp Push v1.03
Agent Handover v1.04
Data Compliance API4
Widget Javascript API4
Introduction
Available methods
Widget events
Widget Attributes
Message Trigger v1.12
Messaging v1.14

Widget Attributes

Set widget attributes when embedding the webchat to customize behavior and pass custom data into the bot context.

Updated on September 24, 2026

When loading the Laiye Chatbot widget on your website, you can modify its behavior by setting some attributes for the component.

They can be set in the following way:

JavaScript
widget.setAttribute("attribute", "value");

Here is a full example of integrating a widget and setting an attribute:

HTML
<script>
    var widget = document.createElement("destygo-webchat");
    widget.setAttribute('id', "destygo_widget");
    widget.setAttribute('class', "destygo_widget");
    widget.setAttribute('token', "d8380225-f558-f1d8-d055-f022657c95c4");
    widget.setAttribute("attribute", "value");
    document.body.appendChild(widget);
</script>
<script type="text/javascript" src="https://widget.mindsay.com/destygo-webchat.js"></script>

Here are the attributes that you can currently modify:

Attribute

Values

Description

mobile

true or false (default false)

Set to true to integrate the widget in a mobile application.

useLocalStorage

true or false (default false)

Set to true to keep the message history in the local storage instead of the session storage. In particular, the conversation will persist if the tab is closed, and the conversation will be synchronized between tabs if multiple ones are open.

disableCsatDisplayedZdTag

true or false (default false)

Set to true to disable the sending of laiye-csat-displayed tag when the Zendesk CSAT is proposed to the chatters. See Zendesk chat documentation for more information about that tag.

user_consent

true or false (default None)

Set to false to exclude user messages from the labelling feature which allows the bot to be trained on user messages. See Labelling chat documentationfor more information about the feature.

Passing attributes to bot context

Custom attributes added this way are also passed to the Bot context, so that you can enrich your use-cases based on data coming from your website.

Check that tutorial for more information about this.

Was this article helpful?

Made from France 💙

Categories

  • ANALYTICS
  • BUILD
  • LOUIS AI
  • INTEGRATE

🔗 Useful Links

  • Sign In
  • Website
  • Terms & Conditions

© 2026

MindsayPowered by Mindsay

Search the help center…

Search help center articles