# Chat

> A floating chat with a full conversation window: embed code, look and behaviour.

Chat is the default way to use the [widget script](/en/docs/widgets/): a button in the bottom-right corner of the page ("Start a conversation"). A click opens a welcome screen with suggested questions, then a chat window with live answers, cards and a contact form.

## Embed code

Paste the code before the closing `</body>` tag or in the `<head>` section:

```html
<script
  src="https://widget-api.prosecaptain.com/embed.js"
  data-widget-token="YOUR_TOKEN"
  data-widget-id="WIDGET_ID"
  data-theme="light"
  data-widget-server-url="https://widget-api.prosecaptain.com"
></script>
```

No container is needed. The script adds the widget at the end of the page.

## What visitors see

- A button labelled "Start a conversation", or "Back to the conversation" once a chat exists, with an unread-message counter.
- A welcome screen with the title, subtitle and suggested questions.
- Answers that appear as they are written, and a contact form when the assistant suggests getting in touch.

The conversation is kept in the browser for 12 hours, so visitors can come back to it on another page.

## Page context

When you turn on **Extract page context** in the widget settings, the widget passes the title, description and content of the current page to the assistant. The assistant can then answer questions about that page.

## Language

Widget labels are available in Polish, English, German, Spanish, Czech, Slovak and Portuguese. Set the language in the app or with `data-widget-language`. Other languages fall back to English labels.