Install the AI chat widget on your website
Embed the Centerfy AI chat widget on any website with a single script tag.
The chat widget adds a floating chat button to your website that connects visitors to your AI chat agent. Paste one script tag before your closing </body> tag and the widget handles everything.
Get your embed code
- Open your chat agent
Go to AI Agents, select your chat agent, and open the Agent Settings tab.
- Copy the embed code
Copy the chat widget script shown on the page. It includes your assistant ID, organisation ID, and sub-account ID pre-filled.
- Paste on your website
Add the script before the closing
</body>tag on your website.
Embed code
<script
src="https://aicrmpro.us/chat-widget.js"
data-assistant-id="YOUR_ASSISTANT_ID"
data-account-id="default"
data-organisation-id="YOUR_ORGANISATION_ID"
data-sub-account-id="YOUR_SUB_ACCOUNT_ID"
data-color="#4c81ec"
data-position="bottom-right"
data-theme="light"
data-show-prompt="true"
data-auto-open="false"
data-prompt-message="Chat with us"
data-assistant-name="Assistant"
data-button-icon="chat"
data-greeting-message="Hi! I am {assistant_name}, ask me anything!"
data-prompts='[]'
data-animation="slide"
></script>
Configuration options
| Attribute | Description | Values |
|---|---|---|
data-assistant-id | Your AI agent’s ID | UUID from agent settings |
data-account-id | Account identifier | default |
data-organisation-id | Your organisation UUID | From your agency workspace URL |
data-sub-account-id | Your sub-account UUID | From your sub-account URL |
data-color | Widget accent color | Hex code (e.g., #4c81ec) |
data-position | Button position on screen | bottom-right, bottom-left |
data-theme | Color theme | light, dark |
data-show-prompt | Show prompt bubble on load | true, false |
data-auto-open | Auto-open chat on page load | true, false |
data-prompt-message | Text in the prompt bubble | Any string |
data-assistant-name | Display name in chat header | Any string |
data-button-icon | Button icon style | chat |
data-greeting-message | First message shown when chat opens. Use {assistant_name} to insert the agent name. | Any string |
data-prompts | Suggested prompt buttons (JSON array) | '["Ask about pricing", "Book a call"]' |
data-animation | Chat open animation | slide, fade |
Where do I find my assistant ID?
Open your agent in AI Agents and go to the Agent Settings tab. The assistant ID is displayed on the page and is also pre-filled in the embed code.
The widget isn't appearing
Check that the script is placed before the closing </body> tag and that data-assistant-id, data-organisation-id, and data-sub-account-id are correct. Open your browser console to check for errors.