window.easyPeasyChat for opening, hiding, and identifying the visitor. To get the snippet without code, see Add your agent to your website.
Embed
<script> tag, not a module. Your agent ID is under Channels > Website > Your Agent ID.
JavaScript API
The script createswindow.easyPeasyChat. You can call its methods before the widget has loaded; the calls wait and run once it’s ready.
When the widget is ready, the window also receives a DOM event,
easy-peasy-chat:ready.
Start hidden
To load the widget without showing the bubble, for example on a checkout page, set this before the script tag and callshow() when you want it:
Single-page apps
Load the script once, in your root layout, and callhide() and show() on route changes. The widget tells the agent about each client-side navigation, so Conversations shows the page each chat started on and the last page the visitor saw.
Identify the visitor
If visitors sign in to your website, pass their details so their conversations show who they are in Conversations:setContact(null) when the visitor signs out. You can also set it before the script loads:
Iframe
To place the chat inside a page instead of floating over it:allow="microphone" lets visitors use voice input and voice calls.
Allowed domains and Content Security Policy
If the agent has Allowed Domains set, the widget works only on those domains. If your site sends a Content Security Policy, allowhttps://bots.easy-peasy.ai in script-src, frame-src, and connect-src.
Add your agent to your website
Build the snippet in the dashboard.
Agents API
Talk to your agent from your backend.
