Once your agent is trained, adding it to your website takes just a few minutes. This guide covers the standard embed method and installation options for popular platforms.
6 min read
Updated May 2026
To add ChatSpark to any website, copy your embed script and paste it into your site's HTML.
</body> tag on every pageThe script looks like this:
<script
src="https://chat.chatspark.io/loader.js"
data-chatbot-id="YOUR_AGENT_ID"
></script>Replace YOUR_AGENT_ID with the ID shown in your dashboard. Once the script is on the page, the chat widget appears automatically in the bottom-right corner.
The official ChatSpark plugin is the easiest way to add your agent to a WordPress site. It handles the embed automatically across all pages.
You can add the embed script to a Shopify store through the theme editor.
</body>Wix supports custom code through its site settings.
Squarespace lets you inject custom code through the website settings panel.
In Webflow, custom scripts are added through the project settings.
You can open the chat widget from any button, link, or element on your page. Add two attributes to any HTML element:
class="cs-trigger-agent" tells ChatSpark the element should open the widgetdata-trigger="Your message here" pre-fills the chat with specific text<button class="cs-trigger-agent" data-trigger="Talk to Sales">
Contact Sales
</button>
<a href="#" class="cs-trigger-agent" data-trigger="I need help with pricing">
Pricing Questions?
</a>