Skip to main content
Once your widget is configured, getting it live is a single script tag. Paste it on your site, publish, and your visitors can start using it. The install flow is identical for Phone and Chat widgets.

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.
Not sure which route to take? Start with Option A. It’s the fastest path to live.

Step 1: Generate a widget tag

  1. Go to Widgets in Agent Studio and open your widget.
  2. Configure Styling and Content.
  3. Click Save and publish.
  4. Open the Embed tab.
  5. Copy the unique script tag. It looks like this:
Embed tab with the widget script tag ready to copy

Embed tab with the widget script tag

The tag is bound to the widget’s domain, variant, and environment. If any of those change, re-publish and re-embed.

Option A: Direct HTML embed

  1. Open the HTML template that loads on every page (often called your global layout, base template, or index.html).
  2. Paste the script tag just before the closing </body> tag.
  3. Publish your website changes.
You only need to embed the script once. Updates to styling, content, or the agent take effect on the next page load. No re-embed required.
Serve the host page over HTTPS. Browsers block microphone access on http://, so Phone widget call buttons stay disabled there.

Option B: Tag Manager

  1. Open your tag manager (e.g., Google Tag Manager) and create a new Custom HTML tag.
  2. Paste the script tag.
  3. Set the trigger to All Pages (or restrict to the pages where you want the widget).
  4. Publish the container.
The widget appears on the next page load.
Copy your actual script tag from Widgets > Embed. The snippet here is illustrative.

Script-tag attributes (Chat widgets)

Chat widgets accept optional data-* 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:
Adjust 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

  1. Open your website in a private/incognito window.
  2. Hard refresh (Ctrl+Shift+R or Cmd+Shift+R) to bypass cached scripts.
  3. Test on a desktop browser (Chrome or Edge) and a mobile device (iOS Safari or Android Chrome).
If anything looks off, see Troubleshooting.

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 to localStorage 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.
Last modified on July 6, 2026