← Back to Docs

Widget installation

Add this script right before </body>:

<script
  src="https://widget.setchat.co/setchat.iife.js"
  data-api-key="site_xxx"
  data-api-url="https://api.setchat.co"
  defer
></script>

Installation checklist

  1. Create a dedicated SetChat site (one API key per site/domain).
  2. Install the script on a staging environment first.
  3. Validate widget open/close behavior on desktop and mobile.
  4. Confirm message send/receive in real conditions.
  5. Roll out to production after validation.

Multi-site setup and best practices

  • Use a different API key per website/domain.
  • Do not reuse one key for staging and production.
  • Version your integration snippets with frontend changes.
  • Document key ownership and where each key is deployed.

Quick troubleshooting

  • Widget not visible: verify script loading in network/console.
  • API error: check data-api-url and site API key.
  • No conversations: test in private browsing without ad blockers.
  • Inconsistent behavior: clear cache/CDN and reload script.