Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
chatWidget.setAttribute('metadata', `[
{ name: 'pageUrl', value: 'hidden' },
{ name: 'userLocale', value: 'hidden' },
{ name: 'timeZone', value: 'hidden' },
{ name: 'ip', value: 'hidden' },
]`);

To show the Widget icon automatically:

Code Block
chatWidget.setAttribute('auto-show', 'falsetrue');

OR

Code Block
<chat-widget auto-show="falsetrue"></chat-widget>

To show the Widget icon (e.g., if ‘auto-show' is set to 'false'):

Code Block
chatWidget.show();

To hide the Widget icon:

Code Block
chatWidget.hide();

...