Skip to main content
After creating and configuring your widget, deploy it to your website using one of the methods below.

Installation methods

Choose one installation method:
  • Option A: Direct HTML embed — recommended for most sites
  • Option B: Tag Manager — if your organization manages scripts through Google Tag Manager or similar
If you’re unsure which route to use, start with Option A.

Step 1: Generate a widget tag

  1. Navigate to Channels > Chat in Agent Studio
  2. Enable Chat as a channel
  3. Enter the domain name you wish to publish the widget on
  4. Configure styling and content settings
  5. Click Save and publish
  6. Navigate to the Embed tab
  7. Copy the unique script tag — it will look like:
<script src="https://messaging.poly.ai/widget/YOUR_UNIQUE_CODE.js"></script>

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
<!DOCTYPE html>
<html>
  <head>
    <!-- Your existing head content -->
  </head>
  <body>
    <!-- Your page content -->

    <!-- Paste the widget script here, before </body> -->
    <script src="https://messaging.poly.ai/widget/YOUR_UNIQUE_CODE.js"></script>
  </body>
</html>

Option B: Tag Manager (GTM)

Use this if your organization deploys scripts using Google Tag Manager or a similar tool.
Always retrieve your actual script tag from Agent Studio (Channels > Chat > Embed tab). The tag below is an example only.
  1. In your Tag Manager, create a new Custom HTML tag
  2. Paste your script tag
  3. Set the trigger to All Pages
  4. Publish the container

Widget positioning

After installing the 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:
<style>
  #poly-ai-chat {
    bottom: 1rem;
    right: 1rem;
  }
</style>
Adjust bottom and right to avoid overlap with cookie banners, navigation bars, or other fixed UI.

Widget icon sizes

DeviceIcon size
Desktop60px × 60px
Mobile44px × 44px
Account for these dimensions when positioning the widget.

Verification checklist

After publishing, verify the following:
1

Widget appears

The widget icon appears on the page (usually bottom-right corner).
2

Chat opens

Clicking the widget opens the chat interface successfully.
3

Messages work

The assistant can send and receive messages.
4

Optional features

If configured:
  • A Call button appears and tapping it starts a call
  • A QR code appears and scanning it works

Quick verification steps

  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)
    • A mobile device (iOS Safari or Android Chrome)

Next steps

If the widget isn’t loading or behaving unexpectedly, see Widget troubleshooting.
Last modified on March 22, 2026