Installation methods
Pick one route:- Option A: Direct HTML embed, recommended for most sites.
- Option B: Tag Manager, when your organization manages scripts through Google Tag Manager or similar.
Step 1: Generate a widget tag
- Go to Widgets in Agent Studio and open your widget.
- Configure Styling and Content.
- Click Save and publish.
- Open the Embed tab.
- Copy the unique script tag. It looks like this:

Embed tab with the widget script tag
Option A: Direct HTML embed
- Open the HTML template that loads on every page (often called your global layout, base template, or
index.html). - Paste the script tag just before the closing
</body>tag. - Publish your website changes.
Serve the host page over HTTPS. Browsers block microphone access on
http://, so Phone widget call buttons stay disabled there.Option B: Tag Manager
- Open your tag manager (e.g., Google Tag Manager) and create a new Custom HTML tag.
- Paste the script tag.
- Set the trigger to All Pages (or restrict to the pages where you want the widget).
- Publish the container.
Copy your actual script tag from Widgets > Embed. The snippet here is illustrative.
Script-tag attributes (Chat widgets)
Chat widgets accept optionaldata-* attributes on the <script> tag, read once at load time, no JavaScript required. Phone widgets don’t use these. Their behavior is configured entirely in the editor and driven by call state.
Widget positioning (Chat widgets)
After installing a Chat widget, you can control its position with CSS. The widget renders inside a#poly-ai-chat element. Add a <style> block in the <body> of your page:
bottom and right to avoid overlap with cookie banners, navigation bars, or other fixed UI.
Widget icon sizes
Account for these dimensions when positioning the widget.
Re-embedding
You only need to re-embed when the script tag itself changes. The Embed tab in Agent Studio shows a Snippet changed banner if the published script differs from the version your team has on the site. Hand the new tag to your dev team or update your tag manager configuration. You do not need to re-embed when you change:- Branding (header text, logo, agent name, primary color).
- CTA copy or disclaimer.
- Policy links.
- The agent or variant the widget connects to (within the same widget configuration).
Verifying the install
1
Widget appears
The launcher renders in the bottom-right corner of pages where the script is embedded.
2
Widget opens
Clicking the launcher opens the widget panel.
3
Phone: place a call
Click Start call. The browser asks for microphone permission. Allow → the widget shows Connecting… then In call when your agent answers.
4
Chat: send a message
Type a message. The agent should respond with the configured greeting and answer subsequent messages.
Quick verification tips
- Open your website in a private/incognito window.
- Hard refresh (
Ctrl+Shift+RorCmd+Shift+R) to bypass cached scripts. - Test on a desktop browser (Chrome or Edge) and a mobile device (iOS Safari or Android Chrome).
Cross-tab behavior (Phone widgets)
When a visitor opens your site in multiple tabs, Web Calling keeps things clean: one active call per browser. The widget writes a heartbeat tolocalStorage while a call is live, and other tabs show the call button disabled with a “Call active in another tab” message. Closing the active tab releases the lock within ~10 seconds.
It’s automatic. No configuration needed.
Next steps
Test your widget
Walk through a real call from the editor preview link (Phone widgets).
Troubleshooting
Common installation issues and fixes.

