# Script tag

> Add an agent to any web page with one script tag and no build step.

Source: https://voxio.in/docs/script-tag · voxioagent 2.0.0 · Index: https://voxio.in/docs/llms.txt

The script tag loads the widgets from a CDN and mounts one, configured by its `data-` attributes.

## Add the script

Paste the script before `</body>`:

```html
<script src="https://cdn.jsdelivr.net/npm/voxioagent@2.0.0/dist/voxio.js"
        data-flow-key="YOUR_FLOW_KEY" data-label="Talk to us" defer></script>
```

Replace `YOUR_FLOW_KEY` with your flow key, from the flow's **Overview** in the dashboard.

A voice button appears in the bottom-right corner of the page.

## Attributes

- `data-flow-key` (string, required): Your flow key.
- `data-widget` ("voice" | "avatar" | "chat"): Which widget to show. Default: `voice`.
- `data-label` (string): The text on the voice button.
- `data-title` (string): The title over the avatar panel.
- `data-placement` (string): Where the widget sits: `bottom-right` (default), `bottom-left`, `top-right`, `top-left`, `bottom-center` or `inline`.
- `data-theme` ("light" | "dark" | "auto"): The colour scheme. Default: `auto`, which follows the visitor's system.
- `data-color` (CSS colour): Your brand colour, for buttons and highlights.
- `data-consent` (string): A notice the visitor accepts before the microphone opens.
- `data-container` (CSS selector): The element to put the widget in. Use it with `data-placement="inline"`.
- `data-environment` ("standard" | "gpu"): The deployment. See [Servers and environments](https://voxio.in/docs/environments.md).
- `data-voice-url` (URL): Overrides the voice server.
- `data-chat-url` (URL): Overrides the chat server.

## Pin a version

Keep the version in the URL (`voxioagent@2.0.0`) so a new release never changes your page without you knowing. Without a version you always get the newest release.

## Next steps

- [Customising widgets](https://voxio.in/docs/customising.md): change colours, placement, language and triggers.
- [Voice button](https://voxio.in/docs/voice-button.md): mount the button from JavaScript and control it.
