Quick Start
Add the Respondo chat widget to your website in under 2 minutes.
1
Add the script
Paste this snippet before </body> on every page where you want the widget:
HTMLhtml
<script>
window.Respondo = window.Respondo || {};
Respondo.init = Respondo.init || function(c) { window.RespondoAIConfig = c; };
Respondo.q = Respondo.q || [];
Respondo.identify = Respondo.identify || function(d) { Respondo.q.push(['identify', d]); };
Respondo.init({
agentId: 'YOUR_AGENT_ID',
channelId: 'YOUR_CHANNEL_ID'
});
</script>
<script src="https://api.respondo.ai/widget/widget.js" async></script>Replace
YOUR_AGENT_ID and YOUR_CHANNEL_ID with the Agent ID and Channel ID from your channel settings (or copy the pre-filled snippet from the channel page). The widget loads asynchronously and won't affect page performance.Using a framework?#
Same widget, wired into your stack — pick a tab:
Render this component once, near the root of your app:
Reacttsx
// respondo-widget.tsx — render once, near the root of your app
import { useEffect } from 'react';
export function RespondoWidget() {
useEffect(() => {
const w = window as any;
w.Respondo = w.Respondo || {};
w.Respondo.init = w.Respondo.init || function (c) { w.RespondoAIConfig = c; };
w.Respondo.q = w.Respondo.q || [];
w.Respondo.identify = w.Respondo.identify || function (d) { w.Respondo.q.push(['identify', d]); };
if (!document.querySelector('script[data-respondo]')) {
w.Respondo.init({
agentId: 'YOUR_AGENT_ID',
channelId: 'YOUR_CHANNEL_ID'
});
const s = document.createElement('script');
s.src = 'https://api.respondo.ai/widget/widget.js';
s.async = true;
s.dataset.respondo = '1';
document.body.appendChild(s);
}
}, []);
return null;
}Replace YOUR_AGENT_ID / YOUR_CHANNEL_ID with the values from your channel settings — or copy the ready-made snippet from the channel page, which has them filled in.
2
Identify users (recommended)
After the user logs in, call identify() to link chat sessions to their profile:
JavaScriptjavascript
Respondo.identify({
email: 'user@example.com',
name: 'John Doe',
userId: 'usr_12345', // your internal user ID
metadata: { // any custom fields
plan: 'premium',
company: 'Acme Inc'
},
properties: { // custom contact properties (defined in Agent Settings)
account_type: 'enterprise',
region: 'eu-west'
}
});Done!
The widget will appear in the bottom-right corner. All conversations flow into your Conversations dashboard automatically.