> For the complete documentation index, see [llms.txt](https://docs.dapta.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dapta.ai/ai-text-agents/channels/widget-embed-your-text-agent-on-a-website.md).

# Widget: Embed your Text Agent on a Website

Embed and customize the Dapta Widget, verify a real website conversation, and investigate delayed responses.

Open your Text Agent's **Channels → Dapta Widget**. You need access to edit your website or its script-insertion settings and an agent ready for customer conversations.

## Install and test

1. Copy the **Agent ID** for reference and the generated embed snippet from Dapta.
2. Paste the snippet into your site's HTML or approved script field, using your website platform's publishing process. Use the generated code rather than reconstructing a script URL.
3. Publish the website change and open the actual page in a fresh browser session.
4. Send a test message, verify the reply, and locate the conversation in [Inbox](/ai-text-agents/inbox.md).
5. Test both desktop and mobile layouts before making the widget part of your customer journey.

Avoid installing the same snippet twice through both a tag manager and the page code.

## Customize the experience

| Setting           | What it changes                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Welcome message   | The introductory text customers see.                                                                                      |
| Default questions | Clickable starting questions. Add examples manually or generate suggestions with AI, then review them.                    |
| Widget style      | Primary/background colors and optional advanced CSS. Test contrast, small screens, and conflicts with your site's styles. |
| Auto Open         | Whether the widget opens automatically. With it enabled, an empty page list applies to all pages on refresh.              |
| Page list         | Add individual page entries using the control; press Enter to add each item. It is not a slash-separated list.            |
| Voice Agent       | When configured, selects the voice agent for the widget's call-request flow; it is not merely a text-agent voice setting. |

Click **Save Changes** after editing and verify the result on the actual website. If you also changed agent instructions, follow the separate [save/test/publish workflow](/ai-text-agents/setting-up-your-text-agent/playground-testing-your-text-ai-agents.md).

## Provide conversation context

The additional-instructions section can use parameters supplied by your website. Follow the generated example for `setConversationParams(object)`; the example keys are `user_id`, `user_name`, and `user_email`.

Supply the values from your own application at the appropriate point in widget initialization. They are examples, not proof that Dapta automatically knows the visitor's identity. Do not place secrets, access tokens, or unnecessary personal information in browser code. Browser-provided context is not a substitute for server-side authorization.

Enable/configure the additional instructions, save, and test a new conversation to confirm that the intended context is used.

## Troubleshoot a missing or slow reply

1. **Widget missing:** confirm the generated snippet is on the published page, loaded only once, and not blocked by the site's script policy or browser extensions.
2. **Old appearance/content:** save changes, reload the actual website, and confirm the snippet belongs to the intended agent.
3. **Slow reply:** allow the current response to finish; avoid repeatedly submitting the same message. Agent reply delay, external actions, and slow processing can affect perceived response time.
4. **Reply visible in Inbox but not on the site:** record the page URL, agent, conversation, time, and browser. This separates a display/delivery problem from an agent that never generated a reply.
5. **No reply in either place:** check publication, [conversation behavior](/ai-text-agents/setting-up-your-text-agent/conversation-behavior.md), action failures, and human assignment.
6. **Persistent failure:** test a fresh conversation and another browser, then contact support with the recorded details. Do not include credentials in screenshots.

The embedded website and the editor's preview may use different builds. A successful preview is not a substitute for testing the deployed page, and slow-response handling is not a guaranteed response-time SLA.

*Source review: September 17, 2026.*

{% content-ref url="/pages/Yd8Dr1GnzSTVXV8kBdd6" %}
[Inbox](/ai-text-agents/inbox.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dapta.ai/ai-text-agents/channels/widget-embed-your-text-agent-on-a-website.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
