Документация по интеграции

Примеры подключения виджета на ваш сайт.

Способы интеграции

Script-тег (рекомендуемый)

Один скрипт перед </body>. Async-loader не блокирует рендер.

html
<script src="https://chat.fuxbot.critica.im/widget/v1/widget.umd.js" async></script>
<script>
  window.FuxbotQueue = window.FuxbotQueue || [];
  FuxbotQueue.push(['init', { apiKey: 'ваш-api-ключ' }]);
</script>

Web Component

Полная CSS-изоляция через Shadow DOM. Удобно для современных стеков и SPA.

html
<script src="https://chat.fuxbot.critica.im/widget/v1/widget.umd.js" async></script>
<fuxbot-widget api-key="ваш-api-ключ"></fuxbot-widget>

iframe

Для сайтов с жёстким Content Security Policy.

html
<iframe
  src="https://chat.fuxbot.critica.im/embed?apiKey=ваш-api-ключ"
  style="border:none; position:fixed; bottom:0; right:0; width:400px; height:600px; z-index:9999;"
></iframe>

← На главную