Configuration
Configure the widget by setting properties on window.receiveo before the loader script runs.
<script> window.receiveo = window.receiveo || {}; window.receiveo.publicKey = "pk_live_YOUR_KEY_HERE"; window.receiveo.showBubbleOnLoad = false; window.receiveo.hideBubbleOnClose = true;</script><script src="https://widget.receiveo.com/loader.js" async></script>Options Reference
Section titled “Options Reference”publicKey (required)
Section titled “publicKey (required)”| Type | string |
| Default | — |
Your workspace’s public key. Found in Settings → Widget Installation.
window.receiveo.publicKey = "pk_live_ABC123";showBubbleOnLoad
Section titled “showBubbleOnLoad”| Type | boolean |
| Default | true |
Whether the chat bubble is visible when the widget loads. Set to false to start the widget completely hidden — useful for headless mode where you control visibility with your own UI.
window.receiveo.showBubbleOnLoad = false;hideBubbleOnClose
Section titled “hideBubbleOnClose”| Type | boolean |
| Default | false |
When true, closing the chat window also hides the chat bubble. The bubble won’t reappear until you call receiveo.api.showBubble().
window.receiveo.hideBubbleOnClose = true;openOnLoad
Section titled “openOnLoad”| Type | boolean |
| Default | false |
Automatically opens the chat window when the widget finishes loading.
window.receiveo.openOnLoad = true;| Type | boolean |
| Default | false |
Marks all conversations as demo mode. Useful for testing.
window.receiveo.demo = true;| Type | boolean |
| Default | false |
Enables console logging for debugging widget issues.
window.receiveo.debug = true;apiUrl
Section titled “apiUrl”| Type | string |
| Default | Production URL |
Override the API endpoint. Only needed for self-hosted or development setups.
window.receiveo.apiUrl = "https://api.your-domain.com";Pre-Chat Form
Section titled “Pre-Chat Form”The pre-chat form is configured in the dashboard under Settings → Conversations, not through JavaScript configuration. When enabled, visitors must provide contact details before starting a conversation.
How It Works
Section titled “How It Works”- Enable the form in Settings → Conversations → Pre-chat form
- Choose which fields to require: Name, Email, Phone (any combination)
- Visitors see a form when they open the widget, collecting their details plus their first message
- After submission, the conversation starts normally
Interaction with identify()
Section titled “Interaction with identify()”If you call identify() before the visitor opens the widget and provide all the required fields, the form is skipped automatically. This is useful when you already know who the visitor is (e.g., they’re logged into your app).
// If the pre-chat form requires name and email,// identifying the visitor skips the form entirelyreceiveo.api.identify({ email: user.email, name: user.name,});